Changing the Ubuntu console resolution when running as a Guest OS in Hyper-V can be a bit of a pain. Here’s how to do it in Ubuntu 14 – 16:
- Open Terminal if you are in your desktop environment
sudo nano /etc/default/grub
- Look for the line
so that it looks something like:
- Uncomment the line
and append your desired resolution with colour depth:
So that it looks like:
Note: there are no quote marks on this line.
- Immediately below
add a new line:
- Exit nano and save the file
- Now the important part is to update your GRUB configuration. Type:
- Reboot the VM
At this point it wouldn’t be a bad idea to install the Hyper-V Integration Services for Linux.
- At the terminal type:
sudo nano /etc/initramfs-tools/modules
- Add the following modules at the end of the file:
- Save and exit the file.
- Next install the actual Integration Services packages by issuing the following commands:
sudo apt-get install --install-recommends linux-tools-virtual-lts-xenial linux-cloud-tools-virtual-lts-xenial
- Finally, reboot the VM once again.