1

I have an Ubuntu VM running in HyperV on a Windows 10 machine. When I connect to the VM using the HyperV Virtual Machine Connection window everything looks and functions just fine except for the fact that the resolution is locked at 1024x768 as well as the fact that by default I am not able to copy/paste into and from the VM to the host Windows machine. I have previously set up a Fedora VM in HyperV and have been able to do everything I need to do by connecting to the VM using Remote Desktop by having xrdp being set up on the VM, so I'm trying to set up an Ubuntu VM the same way but am coming across an issue with the performance and the display of the VM.

Here's the setup:

Host Machine:

  • Windows 10 Enterprise version 22H2
  • OS Build 19045.5131
  • Windows Feature Experience Pack 1000.19060.1000.0
  • HyperV manager version 10.0.19041.1

VM:

  • Ubuntu 24.04.1 LTS x86_64
  • Kernel 6.8.0-49-generic
  • Desktop environment: Gnome 46.0
  • Shell: Bash 5.2.21
  • Window manager: Mutter
  • Window manager theme: Adwaita
  • Theme: Yaru [GTK2/3]
  • Icons: Yaru [GTK2/3]
  • Terminal: gnome-terminal
  • xrdp version 0.9.24

The way I get on the VM via the HyperV Virtual Machine Connection window is by going to the HyperV manager, right clicking on the VM and clicking "Connect" which then brings up the HyperV Virtual Machine Connection window where I click "Start" and the VM starts up and looks as I expect it to.

HyperV Manager connection window:

HyperV Manager connection window

Virtual Machine connection window:

Virtual Machine Connection Window

The way I get on the VM via Remote Desktop is by going to the HyperV manager, right clicking on the VM and clicking "Start" which then starts up the VM but does not bring up the HyperV Virtual Machine Connection window. I then open Remote Desktop where I enter the IP address of the VM in the "Computer" text box and click the "Connect" button which then brings up the xrdp login window where I enter the login credentials for the VM and then click OK which then opens the Remote Desktop window displaying the desktop for the VM.

HyperV Manager start VM:

HyperV Manager start vm

Remote Desktop login:

Remote Desktop login

xrdp login:

xrdp login

The main issue is that when I connect to the VM using Remote Desktop the display is very different and the performance is very slow (applications take quite a while to open, internet is slow, etc).

For clarification, here's a screenshot of what it looks like when using the HyperV viewer (desktop displays with default settings, surrounding black area is due to small resolution):

HyperV Desktop Screenshot

and here's a screenshot of what I see when connecting to the VM via Remote Desktop (desktop is just blue, this shot is the view after pressing the command button to illustrate that the desktop is just blue):

screenshot of vm when connecting with Remote Desktop

When I run neofetch, the only things that are different from running it in the session via Remote Desktop is that the resolution is different as well as the values listed for the memory. In the spirit of being thorough, here are screenshots of both of them:

Remote Desktop:

Remote Desktop neofetch output

HyperV:

HyperV neofetch output

Another thing I've found is that the output from running xrandr displays differently between the two

Remote Desktop:

Remote Desktop xrandr output

HyperV:

HyperV xrandr output

I know that I can personalize the desktop appearance for the Remote Desktop instance, but the fact that by default it looks different from how it looks when booted up from the HyperV along with the fact that the performance is worse leads me to believe that there is something not configured properly to allow Remote Desktop session to look and behave just like the HyperV session when the VM is booted.

So, the question is what do I need to change or configure differently to make it so that when I start the VM via Remote Desktop the VM session looks like it should and also performs as expected (which is how the VM looks and performs when opened via HyperV)?

16
  • Enable the Integration Services from inside the Ubuntu VM. Also, are you logging into the VM from the Machine that has Hyper-V running? Thumbs up for the Diablo Classic reference Commented Dec 11, 2024 at 23:05
  • I installed/enabled the integration services as listed here: community.veeam.com/blogs-and-podcasts-57/… but it still doesn't look right and performs very slowly. Yes, I'm logging into the VM from the host machine that is running HyperV. "Pleeeease, no hurt Gharbad....." Commented Dec 12, 2024 at 20:41
  • Try logging in from another PC in your LAN. Remember the Host Machine and the VM are using the same RAM. Total RAM = Host RAM + VM RAM. Shutting down all unnecessary apps on the Host so that the RAM that gets frees is assigned to the host will help the VM run smoother, and totally getting of the machine will fix the issue. The other fix is to assign less RAM to the VM, thus returning it to the host. Commented Dec 12, 2024 at 21:21
  • Also just noticed: Can you not upgrade your Windows to 23H2? Commented Dec 12, 2024 at 21:37
  • This is a computer on a locked down work network, so I can't try to remote in from a different PC and I can't update to 23H2, that's controlled by group policy. I don't think it's a memory issue, because when I log in to the VM using the HyperV Virtual Machine Connection window that is a part of the HyperV manager, the VM looks and behaves just fine. Still, I closed every application but HyperV and Remote Desktop, the problems persist. Also, I've got a Fedora VM set up and am able to Remote Desktop into it with no issues (not at the same time as logging into the Ubuntu VM of course). Commented Dec 12, 2024 at 21:58

1 Answer 1

0

The Simplicity And Frustration of A Virtual Machine

So, fellow readers, let's put ourselves in the OP's shoes for a few minutes. As a VM user myself (VirtualBox), I understand the OP's frustration level:

  1. Whatever he is doing requires a VM.
  2. He spent a few days setting up a VM on his own.
  3. He attempted to start working on whatever project the VM was created for, only to find the immersion of treating the VM like a real machine not up to par.
  4. He is probably a bit mad at me for asking him to start over.

Reasoning for Starting Over

The OP posed his original question because he was treating the VM as if it were a real machine, but:

  • Instead of fighting the machine to determine what's wrong, it's easiest to start over following predetermined steps
  • I could have linked about a million tutorials in my above comment.
  • A simple Google for "Install Ubuntu Hyper-V" will find them.
    • Find one you're comfortable following, that is easy as a reader to understand. Follow the steps step-by-step even if you know where the steps are leading.
  • Now all the OP needs to do is troubleshoot installing a desktop, as he knows the install he recreated is a good base.

Pro Tip

I'm not here to advertise any particular tool, but the OP should be using a tool like Vagrant, to provision his VM, either custom or using a pre-made Vagrant Box, and adding what's needed.

2
  • I'm not mad at all. Actually, I'm very grateful for the patience you've shown me in trying to troubleshoot this. Thank you! Commented Dec 17, 2024 at 16:55
  • 1
    @GharbadTheWeak Glad I could help. That's what this site is for. Commented Dec 17, 2024 at 17:00

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.