Sunday, 29 June 2014

Debian Screen Resolution when Hyper-V Guest

So I had a need to create a virtual machine on my laptop running Debian Jessie (Testing).   After the installation the screen resolution was limited to 1152x846.   This is a limit within Hyper-V.

I don't know why it took me a number of hours to find the fix for this but I found how to set the resolution on a blog called Random.GetNewEntry().

What is interesting about the fix is that it doesn't involve configuring X Windows. It is a simple change to the GRUB launch command.

I am keeping a copy of the changes needed here for my own reference, but 100 internets go to the owner of the blog.

  1. Edit the grub configuration file, for example:
    sudo vi /etc/default/grub
  2. Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT, and add "video=hyperv_fb:1680x1050" (or your custom resolution) in between the quotes. For example: 
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1680x1050"
  3. Save and exit 
  4. Run 
    sudo update-grub
  5. Restart your computer


  1. Thanks so much for this, I've been looking everywhere :D

  2. Worked like a charm. Big Thanks.

  3. thanks i was hungry i needed some GRUB!

  4. This worked :) Thank you!

  5. Thank you for sharing this. What I had to do was the following:

    gedit /etc/default/grub

    With that, I was able to edit and save.

  6. Still working with Debian 10 & Hyper-V server 2019 !
    Thank you so much

  7. Worked for me on debian 10 under hyper-v/win10. Thanks!

  8. very nice. Thank you, and the original poster.