Last night I was attempting to set up a Ubuntu VM on my device using Hyper-V. I had no problems with creating the VM, nor getting OS installed inside it and booted (apart from I incorrectly chose Generation 2 the first time), however, I've been having problem with changing the resolution of the Virtual Host when connected to it.
I've done a decent amount of searching, and problem solving, but so far, none of my attempts have worked. Here's is what I've tried, and citations where I got the solution (where I could find them again this morning):
- Install Kubuntu 21.04 from their ISO and attempt to change the resolution in the display settings. No other options other than 1024x768 were present.
- Per this article amend the contents of the grub file:
- Open a Terminal.
- Enter
sudo nano /etc/default/grub
- Alter the line starting with
GRUB_CMDLINE_LINUX_DEFAULT
to add the resolution setting. In my case, this wasGRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1200"
- Alter the line starting with
GRUB_CMDLINE_LINUXT
to add the resolution setting. In my case, this wasGRUB_CMDLINE_LINUX="quiet splash video=hyperv_fb:1920x1200"
- Run
sudo update-grub
. - Shut down the VM.
- Start the VM again.
- This resulted in a black screen, the VM was unusable.
- Install
xrdp
per the answer here on Ask Ubuntu and enableEnhancedSessionTransportType
- Install Ubuntu 20.04 via the Hyper-V Quick Create menus. No luck.
- Install
xrpd
on the Ubuntu 20.04 VM; no luck. - Amend grub (as above). No luck
This answer also suggests that the max resolution is 1920x1080 (really not what I want, I have a 1920x1200 display, I'd like to use all the pixels), so i also tried using that in grub's setting, along with installing linux-image-extra-virtual
. Still Kubuntu 21.04 I get 1024x768.
What can I do here? I know it seems daft, but this should just work. I have no problems with creating VMs in Gnome Boxes, both Linux and Windows, and being able to change the resolution. Why isn't this simple functionality in Hyper-V? It's literally impossible to use the VM in 1024x768 on a screen that is 1920x1200; the applicable menu alone in the VM takes up the entire screen, and using an IDE is, well, far from an enjoyable experience.