Categories: UbuntuUbuntu Feed

Change Screen Resolution of An Ubuntu VM in Hyper-V

Recently I created a Ubuntu desktop virtual machine in the Hyper-V platform. After login to the desktop realises that the screen resolution is not correct. I tried to change VM to full-screen mode but it opens in partial screen. When I checked the resolution under the settings found below:

Sponsored
id="caption-attachment-29243" class="wp-caption-text">Current Screen Resolution of Ubuntu on Hyper-V

This how-to guide will help you to change the screen resolution of an Ubuntu VM in Hiper-V. This also allows you to run Ubuntu VM in full-screen mode in Hiper-V.

Changing Screen Resolution in Hyper-V Ubuntu VM

Follow the instructions to change the screen resolution of an Ubuntu VM in Hyper-V:

  1. Login to your system as a sudo or root account.
  2. Open a shell and edit /etc/default/groub configuration file in a text editor
    sudo vim /etc/default/grub 
    

    Update the value of GRUB_CMDLINE_LINUX_DEFAULT variable as below:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1366x768"
    

    Here 1366×768 is the screen resolution of the host machine. You need to change this value as per your host machine resolution

    Sponsored
  3. Now run the following command to update the grub configuration.
    sudo update-grub 
    
  4. Also install the linux-image-extra-virtual package that provides the extra drivers which is not included in base kernel.
    sudo apt install linux-image-extra-virtual 
    
  5. Reboot your system and test

Once the system is rebooted, log in to the Ubuntu desktop and change to full screen. You will see the Ubuntu desktop open in full screen.

Now, check the updated screen resolution of Ubuntu running on the Hyper-V platform.

Updated screen resolution in ubuntu running on hyper-v

Wrap Up

This tutorial helped you to change the screen resolution of an Ubuntu VM running on the Hyper-V platform.

The post Change Screen Resolution of An Ubuntu VM in Hyper-V appeared first on TecAdmin.

Ubuntu Server Admin

Recent Posts

How we used Flask and 12-factor charms to simplify Canonical.com development

Our latest Canonical website rebrand did not just bring the new Vanilla-based frontend, it also…

1 hour ago

Web Engineering: Hack Week 2024

At Canonical, the work of our teams is strongly embedded in the open source principles…

1 day ago

Ubuntu Weekly Newsletter Issue 873

Welcome to the Ubuntu Weekly Newsletter, Issue 873 for the week of December 29, 2024…

3 days ago

How to resolve WiFi Issues on Ubuntu 24.04

Have WiFi troubles on your Ubuntu 24.04 system? Don’t worry, you’re not alone. WiFi problems…

3 days ago

Remembering and thanking Steve Langasek

The following is a post from Mark Shuttleworth on the Ubuntu Discourse instance. For more…

3 days ago

How to Change Your Prompt in Bash Shell in Ubuntu

I don’t like my prompt, i want to change it. it has my username and…

3 days ago