metinsaylan
metinsaylan
As an Amazon Associate, I earn from qualifying purchases.
  1. Home
  2. How To

Change Screen Resolution on Ubuntu 18.04 in Hyper-V VM

Staff // (Updated: )

I really love using Hyper-V both for windows and also linux operating systems. For me, creating a new virtual machine is just like buying a new PC :) In this post, I am going to show you how to easily change screen resolution on an Ubuntu vm that resides inside Hyper-V virtualization environment.

 

Just follow those simple steps to change the screen resolution:

  1. Open a terminal window
  2. Type: sudo vi /etc/default/grub
  3. Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT,
  4. Append video=hyperv_fb:1280x720 so the line should be like;
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1280x720"
  5. Write changes to the file and exit using ESC + :wq
  6. Run sudo update-grub command to update grub configuration.
  7. Reboot the machine (You can use sudo /sbin/shutdown -r now command)
  8. Voila! Your VM now should start with the new resolution you provided.

 

5 Comments

  • Mihai

    work. thank you

  • Kade

    @Dylan Begin with the first instructions and open up a terminal. This can be found in your applications. Sudo vi /etc/default/grub is opening a file located in directory at /etc/default. Vi itself is a text editor, which allows you to make changes to files. Now you need to use vi to find the line stated above. You then add the line given, or whatever your target resolution is. He gives the command to save and exit the file. Then run the last commands and reboot.

  • Dylan

    I'm sorry I have no clue how to "write changes to the file". As a new ubuntu user these instructions seem to assume a lot. Can you please clarify? Also, what should one do if one has inadvertently started multiple instances of this vi /etc/default/grub running in the background because one had no clue that simply exiting the terminal would not kill the instance? Thank you

  • dan

    Didn't work at all, but I'm not on Ubuntu. I'm on Chakra . . .

    • Metin Şaylan

      What resolution did you use? Current maximum resolution is 1920×1080 for the hyper-v display driver. Here is what grub command line should look like:

      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920×1080"

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

More How To
Share Share Tweet