7

When I enter 'Full Screen Mode' on an Ubuntu VM in Hyper-V, it shrinks to a very small resolution that isn't usable. I've tried editing the /etc/default/grub file recommended in other Q&As without luck. I previously had the same issue with 18.04, so I switched to server and ssh'd to the VM; however, I would really like to get a useable full screen desktop going in Hyper-V.

Thanks

2
  • 1
    This link fixed the issue for the same issue I had with Ubuntu 20.04 on windows 10 with HYper-v donovanbrown.com/post/… Oct 9, 2020 at 2:55
  • @RennishJoseph that also fixed my issue with Kubuntu 20.04 on Hyper-V. Worth copy-pasting that into a new answer? May 5, 2021 at 0:11

3 Answers 3

11

The xrdp.service is not starting because the address already in use. There is an issue about this on github.

To solve this:

First, get the scripts from GitHub:

sudo apt-get update
sudo apt install git
git clone https://github.com/Microsoft/linux-vm-tools.git ~/linux-vm-tools
cd ~/linux-vm-tools/ubuntu/18.04/

Then, make the scripts executable and run them...

sudo chmod +x install.sh
sudo ./install.sh
sudo reboot
cd ~/linux-vm-tools/ubuntu/18.04/
sudo ./install.sh
sudo systemctl enable xrdp.service

Open /etc/xrdp/xrdp.ini for editing:

sudo gedit /etc/xrdp/xrdp.ini   

add these two lines (or change them if present):

port=vsock://-1:3389
use_vsock=false

restart the service and system:

sudo xrdp restart
sudo shutdown -h 0

On Windows Powershell with Admin Privileges, run the command:

Set-VM -VMName <your_vm_name>  -EnhancedSessionTransportType HvSocket  

This solution is adapted from the Microsoft Tech Community and a post on medium.com

2
  • 1
    I tried this on Ubuntu 20.10 but I get a black screen after login attempt with Xorg protocol. I'll have to re-install the vm now in order to get into it and this time I will also install Xvnc as a backup.
    – djangofan
    Feb 13, 2021 at 20:08
  • This worked for me. The key part here (not found in the answer here but found in the medium.com link) is to create the VM using generation 2. Jan 3, 2022 at 18:16
2

You can use these steps:

  • Edit Grub

     sudo vi /etc/default/grub
    

    to modify the resolution during boot

  • Modify

     GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1920x1080"
    
  • Modify

     GRUB_CMDLINE_LINUX="quiet splash video=hyperv_fb:1920x1080"
    
  • Save

  • Update grub with

     sudo update-grub
    
  • Reboot

0

I tried different things to get the login dialog with the possibility to adjust the screen resolution. After a new installation of Ubuntu with the predefined Hyper-V package, it worked initially. At some point after that, however, not anymore. It was really annoying. But now I've discovered a possibility that always works for me.

  • Shut down Ubuntu closing the remote connection.
  • Deactivate the guest services for the VM at the integration services.
  • Start Ubuntu without guest services.
  • Quit Ubuntu again and close remote connection.
  • Activate the guest services again.
  • Start VM and connect and voila, the login dialog with the option to select the screen resolution is back.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .