16. Installation

16.1. Installing Spice on RHEL or Fedora

Be aware that RHEL has no builds of qemu/spice-server for i386, only x86_64 builds are available. RHEL >=6 and Fedora >=13

yum install qemu-kvm virt-viewer

The package spice-protocol will be downloaded automatically as a dependency of package kvm.

RHEVM Users

oVirt/RHEVM users could be also interested in the spice-xpi package as it allows you to execute spice-client directly from the oVirt/RHEVM UserPortal.

yum install spice-xpi

16.2. General build instructions

This section is for distributions that don’t have Spice packages in their repositories. It will show you step by step how to build the required Spice components.

Client requirements

See the https://gitlab.freedesktop.org/spice/spice-gtk/raw/master/README.md [README file in spice-gtk] for the list of dependencies.

Host requirements

  • KVM supported by kernel (It should work also without KVM, but it’s not being tested as most Linux distrubitions already support KVM.)

Guest requirements

Linux guest. spice-vdagent requires virtio-serial support to be enabled. This is described in the chapter Section 4, “Agent”. Guest should have installed qxl driver (xorg-x11-drv-qxl on Fedora and RHEL).

Windows guest. Drivers for QXL and drivers for virtio-serial require Win XP SP3.

Building

The environment variable $BUILD_ROOT will point to a directory with stored sources and will be used during the whole build process. The variable $INST_ROOT will point to a directory in which Spice will be installed.

Important

These instructions may be outdated. Feel free to ask on the Spice mailing list if you need help building from source.

export BUILD_ROOT=/tmp/spice; mkdir $BUILD_ROOT
export INST_ROOT="/opt/spice"; mkdir $INST_ROOT
export PKG_CONFIG_PATH=$INST_ROOT/lib/pkgconfig:$PKG_CONFIG_PATH

cd $BUILD_ROOT
git clone https://gitlab.freedesktop.org/spice/spice.git
cd $BUILD_ROOT/spice
./configure --prefix=$INST_ROOT
make
make install

cd $BUILD_ROOT
git clone git://git.qemu.org/qemu.git
cd $BUILD_ROOT/qemu
./configure --prefix=$INST_ROOT --target-list=x86_64-softmmu --enable-spice
make
make install

Setting up PATH

Last steps before starting with Spice are to set proper PATH variable. For example RHEL is using /usr/libexec as directory for qemu-kvm binaries. The following setup should be suitable for qemu and Spice built according to the instructions in this chapter.

echo "export PATH=$PATH:$INST_ROOT/bin" >> ~/.bashrc
source ~/.bashrc

You should now be able to access the qemu-system-x86_64 Spice binary.