Hyper-V Clipboard and Integration Services in Ubuntu
Olivia Zamora
I have Ubuntu 14.04 running in Windows Hyper-V. I am experiencing a problem with the Clipboard (copy from host to Virtual Machine), it is not working correctly (It was not working with Ubuntu 12.04 also). I suspect that the problem lies in the Integration Services. Are they enabled by default or do I need to enable them in Ubuntu 14.04 ? Does anyone else experience the same problem with the Clipboard Copy-Paste function ?
Interesting is that in the Hyper-V Clipboard the Capture Screen(Ctrl+C) works as seen in the image below, but Type Clipboard Text (Ctrl+V) does not work.
lsmod | grep hvI have searched the web and found only information about Ubuntu 12.04. This is what has to be done on Ubuntu 12.04: click here. Does this also apply for Ubuntu 14.04 ? If I am correct I do not have to install something (Linux Integration Services 3.5 here), everything is already installed in Ubuntu, but is the procedure the same as in the above link ?
To enable VSS Snapshot daemon and KVP daemon use the following command:
# sudo apt-get update
# sudo apt-get install hv-kvp-daemon-initUbuntu virtual machines feature distribution map here
33 Answers
Since this question was asked (re ~ Ubuntu 15.04) things have progressed significantly with regards to Hyper-V & Ubuntu 18.04.1 with regards to ‘Enhanced Session Mode’.
There are two approaches currently:
A. New System ~~ Optimized Ubuntu Desktop images available in Microsoft Hyper-V gallery
B. Existing System ~~ manually configure xRDP to support ‘Enhanced Session Mode’
Here are the details:
Option A)
- In Hyper-V, on your server & select [Quick Create]
- In the [Create Virtual Machine] dialog, select [Ubuntu 18.04.1 LTS] && then [Create Virtual Machine]
- Then complete the standard Ubuntu installation options
- ‘Enhanced Session Mode’ will prompt you to setup screen resolution, local resources, etc.
- Note/Caution ~ if you have problems using drives, then you may want to de-select the [Printers]
Here are the links to where I sourced the information:
○ Optimised Ubuntu Desktop images available in Microsoft Hyper-V gallery
○ Run Ubuntu virtual machines made even easier with Hyper-V Quick Create
Option B)
Modify Ubuntu 18.04 to use xrdp
1.1 Get the scripts from GitHub
sudo apt-get update sudo add-apt-repository ppa:git-core/ppa sudo apt update; sudo apt install git git clone ~/xrdp-init1.2 Make the scripts executable and run them...
cd ~/xrdp-init/ubuntu/18.04/ sudo chmod +x install.sh sudo ./install.sh reboot1.3 <After Reboot> Run script again to finish setting up VM
cd ~/xrdp-init/ubuntu/18.04/ sudo ./install.shShutdown Ubuntu VM
Register Ubuntu Session ~ run this command on host PC using powershell with admin rights:
Set-VM -VMName YourUbuntuVMNameHere -EnhancedSessionTransportType HvSocketRestart VM
Connect/Login to XRDP from Hyper-V (note ~ enter username - must be lowercase)
Note/Caution ~ if you have problems using drives, then you may want to de-select the [Printers]
Here is the link to where I sourced the information:
2Unfortunately it doesn't work. It looks like the correct answer here is to either:
- SSH into your box so you can cut & paste into the your Windows SSH
window - Use Oracle's VirtualBox. Cut & Paste seems to work there.
Doing an lsmod | grep hv on a fresh install of Ubuntu Server 14.04 shows that the Hyper-V modules are already enabled for me.
- hv_vmbus
- hv_storvsc
- hv_blkvsc
- hv_netvsc
- hv_utils
You are correct in saying that the Linux Integration Services supplied my Microsoft are not required in Ubuntu.
10