Software & AppsOperating SystemLinux

How To Resize Ubuntu Display in Hyper-V on Windows 10 and 15.04

Ubuntu 5

In this article, we will guide you through the process of resizing the Ubuntu display in Hyper-V on Windows 10 and 15.04. This can be a common issue for users running Ubuntu as a guest operating system (OS) in a Hyper-V virtual machine (VM).

Quick Answer

To resize the Ubuntu display in Hyper-V on Windows 10 and 15.04, you need to edit the GRUB file, remove the RemoteFX 3D Video Adapter, install the Hyper-V display driver, and optionally use Enhanced Session Mode for a better display experience.

Prerequisites

Before we start, ensure that you have the following:

  • A Windows 10 or 15.04 host OS with Hyper-V installed and running.
  • An Ubuntu 15.04 guest OS installed in a Hyper-V VM.

Step 1: Editing the GRUB File

The first step involves editing the GRUB (Grand Unified Bootloader) file in your Ubuntu OS. The GRUB file is responsible for managing the boot process of the OS.

  1. Open a terminal in Ubuntu. You can do this by pressing Ctrl+Alt+T.
  2. Run the following command to open the GRUB file in a text editor with root privileges:
sudo nano /etc/default/grub
  1. Look for the line that reads GRUB_CMDLINE_LINUX_DEFAULT="quiet splash".
  2. Change this line to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1080". Replace 1920x1080 with your desired resolution.
  3. Save the changes and exit the text editor. In nano, you can do this by pressing Ctrl+X, then Y to confirm saving the changes, and finally Enter to exit.
  4. Now, you need to update the GRUB configuration. Run the following command in the terminal:
sudo update-grub
  1. Reboot the Ubuntu guest OS for the changes to take effect. You can do this by running the reboot command.

Step 2: Removing the RemoteFX 3D Video Adapter

If you have added the RemoteFX 3D Video Adapter in the VM settings, you need to remove it. This adapter can cause issues with the display resolution in Ubuntu.

  1. Open the settings of your VM in Hyper-V.
  2. Navigate to the Hardware section.
  3. Locate and remove the RemoteFX 3D Video Adapter.
  4. Reboot the Ubuntu guest OS for the changes to take effect.

Step 3: Installing the Hyper-V Display Driver

The next step is to install the Hyper-V display driver in your Ubuntu OS. This driver improves the display performance in Hyper-V.

  1. Open a terminal in Ubuntu.
  2. Run the following command to install the Hyper-V display driver:
sudo apt-get install linux-image-extra-virtual
  1. Reboot the Ubuntu guest OS for the changes to take effect.

Step 4: Using Enhanced Session Mode

If you are using Ubuntu 18.04.1 or later, you can use the Enhanced Session Mode for a better display experience. This mode provides a full Linux desktop experience with adjustable window sizes, clipboard sharing, drive redirection, and more.

You can either use the optimized Ubuntu Desktop images available in the Microsoft Hyper-V gallery or manually configure xRDP to support Enhanced Session Mode.

Conclusion

Resizing the Ubuntu display in Hyper-V on Windows 10 and 15.04 can be a bit tricky, but with the right steps, it’s certainly doable. Remember that certain configurations, such as Surface Book or Ubuntu 20.04, might have specific issues, so always check for the latest solutions and updates. We hope this guide has been helpful in resolving your display resolution issues in Ubuntu running on Hyper-V.

Can I resize the Ubuntu display in Hyper-V on Windows 10 and 15.04?

Yes, you can resize the Ubuntu display in Hyper-V on Windows 10 and 15.04 by following the steps outlined in this article.

What are the prerequisites for resizing the Ubuntu display in Hyper-V?

The prerequisites for resizing the Ubuntu display in Hyper-V are a Windows 10 or 15.04 host OS with Hyper-V installed and running, and an Ubuntu 15.04 guest OS installed in a Hyper-V VM.

How do I edit the GRUB file in Ubuntu?

To edit the GRUB file in Ubuntu, open a terminal and run the command sudo nano /etc/default/grub. This will open the GRUB file in a text editor with root privileges.

What changes do I need to make in the GRUB file to resize the display?

In the GRUB file, you need to change the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1080". Replace 1920x1080 with your desired resolution.

How do I update the GRUB configuration?

To update the GRUB configuration, run the command sudo update-grub in the terminal.

Do I need to remove the RemoteFX 3D Video Adapter in Hyper-V?

Yes, if you have added the RemoteFX 3D Video Adapter in the VM settings, you need to remove it to avoid display resolution issues in Ubuntu.

How do I install the Hyper-V display driver in Ubuntu?

To install the Hyper-V display driver in Ubuntu, open a terminal and run the command sudo apt-get install linux-image-extra-virtual.

What is Enhanced Session Mode and how can I use it in Ubuntu?

Enhanced Session Mode provides a better display experience in Ubuntu. If you are using Ubuntu 18.04.1 or later, you can either use the optimized Ubuntu Desktop images available in the Microsoft Hyper-V gallery or manually configure xRDP to support Enhanced Session Mode.

Do I need to reboot the Ubuntu guest OS after making changes?

Yes, you need to reboot the Ubuntu guest OS for the changes to take effect after editing the GRUB file, removing the RemoteFX 3D Video Adapter, and installing the Hyper-V display driver.

Are there any specific issues I should be aware of?

Certain configurations, such as Surface Book or Ubuntu 20.04, might have specific issues. Always check for the latest solutions and updates to resolve any display resolution issues.

Leave a Comment

Your email address will not be published. Required fields are marked *