16

I have a RHEL 6 Desktop with a windows KVM. How could I get the clipboard working, just as there is a solution in VirtualBox to share the clipboard between host and guest?

2

3 Answers 3

9

Edward's answer, and google, solved this for me. Gertvdijk had also mentioned it. Installing the Spice Windows Guest Tools on my windows guest allowed clipboard sharing without even having to restart the guest. In a shameless attempt to get enough reputation to vote up, I'll fill in the gaps that slm suggested, and seeing it was high in the list in my search, will hopefully help someone :)

Spice is among other things a display server/front-end for KVM to give better graphics performance, and is available as a display option by default, as VNC server is, through virt-manager; a front end script for creating/managing VMs, or of course manually from the command line (see link below). It, like VNC, allows you to connect to remote VMs' displays also, and using virt-manager, connecting to the libvirtd and VMs of another machine is easy via ssh etc

To get the spice guest tools running (I have ubuntu host, windows 7 guest), download the installer (contains the QXL video driver, and the spice agent) from the Guest -> Windows Binaries section, and choose Windows guest tools (at time of writing is spice-guest-tools-0.100.exe). Run the installer, and the drivers will be installed, the "Spice VDAgent" service will be installed, and started, and the clipboard sharing will work from there

Some more info on spice can be found here.

1
7

As already mentioned by @gertvdijk, SPICE is KVM's own way to address that.

Otherwise, a more generic solution that works equally well for any type of virtual and real machine is to use remote desktop or VNC to connect to the machine itself.

If you're not using SPICE, you're using VNC already anyway. However, in that case, the VNC server is provided by the host (which serves the video memory, keyboard and mouse of the Guest, but has no access to the Guest's clipboard which is something internal to the desktop environment inside the Guest).

By moving the VNC server to the Guest, you put it in a place where it has access to the clipboard.

Remote Desktop has a few other advantage over VNC (like file, device and sound sharing).

1

Spice supports sharing the clipboard, but you must install spice-guest program in the VM. Otherwise, clipboard sharing will not work.

You can enable clipboard sharing by a checkbox in the spice-gtk program.Then you can copy from client to paste in vm. You can also copy from the VM to paste in the client.

1
  • Hi and welcome to Unix and Linux. Could you explain how to do this in a little bit more detail and also explain what Spice is in your answer? I did not downvote you but it's likely someone else did because your answer didn't include much details.
    – slm
    Aug 13, 2013 at 12:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .