Ubuntu 20.04 on Hyper-V
Creating Virtual Machine
- Create appropriate virtual machine:
2. Follow the wizard’s flow and be avare to select Generation 2 on Specify Generation screen:
And when Installation Options screen prompted find the path to your Ubuntu 20.04 ISO file:
Finish the setup and you are almost ready to go.
3. Tweak VM settings ( Right click on VM ->Settings …) and disable Enable Secure Boot and assign more virtual processors if you are able:
4. Connect to VM ( Right click on VM -> Connect) and start it:
5. Follow the installation process as usual.
Install Microsoft Linux-VM-Tools
1. Update system and install git:
sudo apt-get update
sudo apt install git
2. Clone appropriate repository and position inside desired folder:
git clone https://github.com/Microsoft/linux-vm-tools.git ~/linux-vm-tools
cd ~/linux-vm-tools/ubuntu/18.04/
3. Install Linux-VM-Tools and reboot the system ( If they stated XRDP error proceed to steps 4 and 5)
sudo chmod +x install.sh
sudo ./install.sh
sudo reboot
[IF ERROR] 4. Edit XRDP INI file:
sudo gedit /etc/xrdp/xrdp.ini
change these two lines:
port=vsock://-1:3389
use_vsock=false
[IF ERROR] 5. Start XRDP service:
sudo systemctl enable xrdp.service
sudo systemctl start xrdp.service
6. Reboot and if everything is done correctly you should be welcomed with a screen to select resolution:
Complete github gist
Resources
- https://techcommunity.microsoft.com/t5/virtualization/sneak-peek-taking-a-spin-with-enhanced-linux-vms/ba-p/382415
- https://github.com/microsoft/linux-vm-tools/issues/94