Skip to main content

Shared clipboard virt-manager debian <-> kali

Another short post on virtualization. I wanted to bidirectionally share the clipboard between my Debian host and Kali guest running in virt-manager1. When I briefly used VirtualBox this was very easy to achieve. Using KVM it's slightly less straightforward.

I did a little research and found You need spice-vdagent:

Debian or Kali Linux installed to as KVM guests do not automatically have qemu-guest-agent or spice-vdagent installed. This will prevent seamless movement of the mouse cursor between the guest and host desktop in Virtual Machine Manager (requiring the use of a Ctrl-Alt to release the cursor from the guest window).

To cure this, install both qemu-guest-agent and spice-vdagent on each guest and reboot (the guests).

sudo apt install qemu-guest-agent sudo apt install spice-vdagent

It didn't work but it wasn't obvious to me that you manually had to add a spice channel to the guest machine (thank you @mindofjoe!).

spice

View -> Details -> Add Hardware -> Channel.

In my case:

Device Type: spicevmc

Target Type: virtio

Target Name: com.redhat.spice.0


Now my virtual Kali machine setup is pretty much how I want it, I just need to work a little more on how to integrate it better with i3wm.


  1. Again, I'm not so sure that this is such a good idea from a security perspective.