Slackware64: Qemu, KVM and Spice

On the other day, I wrote a bit about qemu-kvm and virt-manager. After the installation and configuration, I fired up virt-manager and Windows XP guest. Hmm... mouse movement is sluggish, moving a window leaves afterimage, and frequent freeze-up. Also, the sound doesn't seem to be working. A big disappointment.

With more digging, I found Spice. Spice (Simple Protocol for Independent Computing Environments) offers high-quality remote access to QEMU virtual machines. It's much like vnc, and is said to handle the sound better. Hmm... it sounds interesting and what's there to lose?

The information below is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others.


First of all, download the spice package and its dependencies from and install them.

Creating a VM and installing Windows XP:

Prepare a virtual disk $ qemu-img create -f raw winxpvm.img 15G

Install VM enabling Spice $ virt-install \ --connect=qemu:///system \ (Use Qemu) --name=winxpvm \ (Domain name) --ram=1024 \ (Allocate 1024MB for memory) --vcpus=1 \ (Number of virtual CPUs) --os-type=windows \ (Type of OS is Windows) --os-variant=winxp \ (OS Variant is Windows XP) --hvm \ (Use full virtualization) --virt-type=kvm \ (Hypervisor to install) --cdrom=/[path_to_windows_installation_iso] \ (Virtual CD-ROM device) --disk path=/[path_to_winxpvm.img] \ (Path to storage media) --graphics spice,port=9500,listen= \ (Use Spice protocol, port number and address to listen to) --video=qxl \ (Video device. Use 'qxl' for Spice) --channel spicevmc \ (Use spicevmc channel) --soundhw ac97 \ (Attach a virtual audio device. Use 'ac97' for Spice) --accelerate (Use KVM or KQEMU in this order)

Now open another console and type the following command $ spicec -h -p 5900 -t winxpvm

By executing above command, it opens up another window with XP Installation.

Spice Guest Tools for Windows:

On Windows guest system, go to Spice Download page and download Spice Guest Tools for Windows guest for better performance and integration with Spice.

Additional binaries can be downloaded from

PolicyKit Setup:

PolicyKit allows for more flexible, fine grained access control to the libvirt virtualization layer. Since I wanted a regular user, me!, to be able to execute the virsh command, I configured PolicyKit.

That's all!

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>