Return to Level1Techs.com

Bidirectional clipboard not working

I got a Widnows VM with Looking Glass working by following the ArchWiki and the installation steps at the Looking Glass website. Looking Glass is working fine for the most part, however the copy-and-paste functionality only works when copying from the real PC to the VM, not the other way around.

Current setup:

  • Host: ArchLinux with Kernel 5.3.7 and Plasma 5.17 as DE
  • Guest OS: Windows 10 May 2019
  • Setup a qemu channel using unix sockets and a spice channel using spicevmc
  • Disabled QXL adapter by setting “model type=‘none’”

So far my tests include:

  • Making sure the Looking Glass host and viewer versions match (I’m using B1 version)
  • Installing (and reinstalling) VirtIO drivers and Spice Guest tools including version 0.1-161
  • Making sure the qemu-ga and spice-vda services are running on Windows
  • Testing multiple combinations of spice:clipboard, spice:clipboardToVM and spice:clipboardToLocal
  • Disabling Plasma clipboard manager and restarting Plasma

Did you add the serial device for spice to the VM?

 -chardev spicevmc,id=vdagent,name=vdagent \
 -device virtserialport,chardev=vdagent,name=com.redhat.spice.0

Not sure of the xml for libvirt, but if you are (or figure them out) would you mind providing them so that I can add them to the LG wiki (or you can :slight_smile: )

https://looking-glass.hostfission.com/wiki/index.php?title=FAQ#The_mouse_is_jumpy.2C_slow.2C_laggy_when_using_SPICE

Virt Manager adds a VirtIO Serial device automatically when I add a Spice or QEMU channel. The XML looks like this:

<controller type="virtio-serial" index="0">
	<address type="pci" domain="0x0000" bus="0x09" slot="0x00" function="0x0" />
</controller>

Yes, but what about the spicevmc vdagent channel? After starting your VM please run ps aux | grep qemu and check for the correct flags.

After running the VM, I can see qemu is running with:

-chardev spicevmc,id=charchannel0,name=vdagent 
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 

In addition to the previous commands, qemu is also running with these very similar commands

-chardev socket,id=charmonitor,fd=34,server,nowait 
-mon chardev=charmonitor,id=monitor,mode=control 
-chardev socket,id=charchannel1,fd=36,server,nowait 
-device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0

Can you please confirm that you installed the SPICE guest tools, not just the QEMU ones?

https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe

The same version as the link you mentioned is installed, also tried to install Spice Agent manually and problem persists in both scenarios.

If you launch the spice agent from command prompt you should get some debug output. If you do this, what do you see?

vdagent.exe closes immediately if I double click on it, so I tried to stop and then start the Spice service, this is the output I get:

> net start vdservice
The Spice Agent service is starting.
The Spice Agent service was started successfully.

Is there a way to get a more complete log out of vdservice?

I find virt-manager can sometimes interfere with looking glass’ clipboard because it also implements the spice clipboard.

If you use virt-manager then try quitting it using CTRL+Q.

Thank you both for your support, unfortunately reinstalling Spice nor using Ctrl + Q worked. However the issue seems to be limited to Windows 10 1903, as I was able to get it working right on Windows 10 1809.

How odd, I am using 1903 with clipboard support just fine.