Language: EN


Change the resolution of a Linux machine in Hyper-V

If you are using a Windows system and the Hyper-V virtual machine engine to virtualize Linux machines, you may have found that the default resolution is very low.

Hyper-V is a very good solution for virtualizing machines under a Windows environment. But, by default, when we create a new Linux virtual machine, the default resolution is 1024x768.

This resolution may be insufficient, especially in distributions with heavier window environments, making it quite annoying to work with them.

Fortunately, it is very easy to change this in systems that use the Grub bootloader, as is the case with the vast majority of Linux distributions.

To do this we edit the Grub configuration file by doing

sudo nano /etc/default/grub



And modify it by adding the following video=hyperv_fb:1680x1050, with 1680x1050 being the resolution we want, as follows,

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1080"

In this case, we would be applying the 1920x1080 resolution. Of course, we could have used any other.

Next, we update the grub system by typing the following,

sudo update-grub

And finally, we restart the computer by doing,

sudo reboot

That’s how simple it is to change the resolution of a Linux operating system in Hyper-V. Now we can work with our virtual machines in a much more comfortable way.