SPICE在ubuntu上的实现。
SPICE的安装过程,参照:http://docs.cslabs.clarkson.edu/wiki/SPICE的介绍,依赖包中。应该另外安装libjpeg-dev包。
?
Support for SPICE 0.6 is currently included in a late 0.13 release of QEMU, we will install that version now. We will be installing this "spiced" QEMU alongside the system QEMU, so make sure you perform the installation in some permanent location. I chose/opt/qemu-spice, but you can do it wherever you want.
Note that we must switch to a branch of the qemu git tree - v19 is the latest branch at time of writing (2010-09-23). According to theSPICE documentationthe branch number is in flux and is subject to change.
This whole subsection should be done as root, to avoid exposing/optto ordinary users. If you don't want to work as root, prepend each command with sudo.
cd /optmkdir qemu-spicecd qemu-spice/git clone git://git.freedesktop.org/git/spice/qemucd qemu/git checkout -b spice.v19 origin/spice.v19
Now we have to change the configure script to not set the -Werror CFLAG. This is dangerous, but I couldn't get qemu to compile without forcing the configure script to not set it. Open the configure script in your favorite editor and find the part that looks like:
if test "$werror" = "yes"; then QEMU_CFLAGS="-Werror $QEMU_CFLAGS"fi
Change it to remove the -Werror, like so:
if test "$werror" = "yes"; then QEMU_CFLAGS="$QEMU_CFLAGS"fi
Now, run the configure script and make QEMU. Please note that compiling QEMU in this way will enable it to emulate only a 64-bit host; add extra targets if you need other architectures.
./configure --target-list=x86_64-softmmu --enable-spice --enable-io-threadmake
QEMU needs certain BIOS files to be able to start SPICE VMs, so we have to copy them to a location QEMU expects to find them.
cp pc-bios/vgabios-qxl.bin /usr/share/qemu/cp pc-bios/pxe-e1000.bin /usr/share/qemu/
Spiced QEMU is now available, the executable is located at/opt/qemu-spice/qemu/x86_64-softmmu/qemu-system-x86_64. Make a symlink for convenient invocation:
ln -s /opt/qemu-spice/qemu/x86_64-softmmu/qemu-system-x86_64 /usr/sbin/qemu-spice
And that's it! You can invokeqemu-spicewith the argument "-spice" to start a SPICE server. As soon as QEMU 0.14 is released, however, you can use the QEMU package available in the Ubuntu repositories instead, since it will include SPICE support by default.
-vga qxlin order for the mouse driver to work.?