Virtual Insider

Blog archive

How To Change the Resolution of an Ubuntu Hyper-V Virtual Machine

Microsoft Hyper-V is continuously improving its support for Linux distributions, but some occasional manual tweaking is necessary to accomplish tasks.

Take, for example, an installation of Ubuntu in a Hyper-V VM. If you try to change the screen resolution from the GUI, you'll find that it's impossible. This is despite the fact that there is full integration between Hyper-V VMs and Ubuntu distribution, and this integration also includes a virtual video driver.

Fortunately, there's a manual workaround that's easy to implement and which accomplishes the same objective. Follow these steps to change the screen resolution:

  1. From within the Ubuntu virtual machine, open Terminal
  2. Type sudo vi /etc/default/grub
  3. Find GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
  4. Append that line with video=hyperv_fb:[specify resolution, e.g. 1024x768]
  5. Here is what it might look like: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1024x768"
  6. Save changes and exit
  7. Run the following command: sudo update-grub
  8. Restart the VM

This is a simple workaround that allows you to customize the screen resolution of an Ubuntu installation inside a Hyper-V VM. As always, there are many different ways of updating files in Linux distribution; I'm simply offering one of those methods. If you have other tips, share them in the comments section so others can benefit from your knowledge.

Posted by Elias Khnaser on 09/29/2014 at 1:28 PM


Featured

Subscribe on YouTube