Ubuntu – Ubuntu Server 18.04 LTS cannot change resolution in Hyper-V

display-resolutionhyper-vservervirtualization

I am testing Ubuntu Server 18.04 LTS using a Hyper-V VM running from Windows 10 1709, but so far I have been unable to change the console resolution. I have already installed the virtual services, modified grub file, updated grub config, but it does not work, the resolution always stucks at 1152×864 pixels.

I have another VM running Server 16.04 LTS and there it works flawlessly.

This is all the config I have done

  1. Update repositories.
  2. Install linux-virtual, linux-cloud-tools-virtual, linux-tools-virtual
  3. Verify the hyper-v daemons are loaded with lsmod (they are)
  4. Modify the file /etc/default/grub with the following GRUB_CMDLINE_LINUX_DEFAULT=video=hyperv_fb:1024x768 and running sudo update-grub
  5. Reboot the VM.

I would be glad if someone can shed more light to know why it's not working or if there is a new trick to apply with this version.

Best Answer

  • I changed both the CMD_LINE_DEFAULT and the next CMD_LINE with the same value (resolution I wanted), updated then rebooted, and it worked.

    Like this:

    GRUB_CMDLINE_LINUX_DEFAULT=video=hyperv_fb:1366×768
    GRUB_CMDLINE_LINUX=video=hyperv_fb:1366×768