Monday, August 27, 2012

qemu-kvm spice features

Spice is one of my favorite playgrounds for a long time. Even though it doesn't have lots of features (yet) it's already quite stable and while things like clipboard sharing and window re-sizing are not new, they are new to me.
Recently iv'e started to try out those features, especially clipboard sharing is something which i really wanted to have.

Host settings:
Basically it's pretty simple. First, you'll need to add following to your start command of qemu-kvm:
 -device virtio-serial -chardev spicevmc,id=vdagent,name=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0  

Guest settings:
Secondly, it's really important that you enable the consolekit useflag for your window manager (except windows clients). In order that other programs can use it too i enabled it system-wide in make.conf.
Furthermore you have to install the spice vdagent. There is a package in gentoo (app-emulation/spice-vdagent) which does the job.
 emerge -av spice-vdagent  

Afterwards you just have to start the said agent with:
 /etc/init.d/spice-vdagent start  
 rc-update add spice-vdagent default  

Usually you don't have to change anything in the config of the agent as long as you don't change anything at the start command.
However, depending on your Window Manager it can happen that the spice vdagent doesn't work.

So far i found out that it doesn't work with awesome. Xfce, lxde, gnome, kde, razorqt and even windows 7 (with the corresponding driver) are working flawless. I think the reasons is consolekit. The window manager has to be build with consolekit support, otherwise the agent would be useless.

No comments:

Post a Comment