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