然后我就按着教程一步一步的安装,但是在中间总是出现了一些错误,最后总是没能全部安装好.我也来做一次搬运工吧.搬运一些官方教程上面的步骤.
SPICE主要包括三部分:SPICE protocol (协议)、SPICE Client(客户端) 、SPICE Server(服务端)
sudo apt-get install build-essential autoconf git-core当然,还有编译安装包使用的工具也要安装:
sudo apt-get install libtool liblog4cpp5-dev libavcodec-dev libssl-dev xlibmesa-glu-dev libasound-dev libpng12-dev libfreetype6-dev libfontconfig1-dev libogg-dev libxrandr-dev kvm libgcrypt-dev libsdl-dev libnss3-dev libpixman-1-dev libxfixes-dev libjpeg8-dev libsasl2-dev python-pyparsing
cdmkdir spice-sourcescd spice-sources1. SPICE安装依赖包:
git clone git://people.freedesktop.org/~alon/libcacardcd libcacard./autogen.shmakesudo make installcd ..
wget http://spice-space.org/download/releases/spice-protocol-0.8.0.tar.bz2tar xjvf spice-protocol-0.8.0.tar.bz2cd spice-protocol-0.8.0mkdir m4./configuremakesudo make installcd ..
wget http://downloads.us.xiph.org/releases/celt/celt-0.5.1.3.tar.gztar xvzf celt-0.5.1.3.tar.gzcd celt-0.5.1.3/./configuremakesudo make installcd ..
wget http://spice-space.org/download/releases/spice-0.8.1.tar.bz2tar xjvf spice-0.8.1.tar.bz2cd spice-0.8.1./configure --enable-smartcardmakesudo make installcd ..This step is possible to perform on a 32-bit host; it's only installing the SPICE client. 值得注意的是:32位系统只能安装SPICE 的客户端,下面的服务端是无法安装的!
echo "export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}" >> ~/.bashrcsource ~/.bashrcNow, we can continue with the installation. Note that if you require a specific softmmu target, you can add a list of them with the --target argument. By default, QEMU only builds with support for 32-bit x86 guests. 继续安装,(PS:如果在之前已经安装过QEMU的话,这一步可以省略)
wget http://download.savannah.gnu.org/releases/qemu/qemu-0.14.0.tar.gztar xzvf qemu-0.14.0.tar.gzcd qemu-0.14.0./configure --enable-spice --enable-kvm --enable-io-thread --audio-drv-list=alsa,oss --enable-systemmakesudo make installNow, we need to copy over some BIOS files that qemu will need to start SPICE VMs. We just need to put them in a location that QEMU expects them to be. 拷贝相关文件到QEMU 目录下让qemu启动虚拟机。(PS:如果之前已经安装QEMU,此步只需确认在/usr/share/qemu/目录下有以下两个文件即可,如果没有,那就得手动拷贝过去)
sudo cp pc-bios/vgabios-qxl.bin /usr/share/qemu/ sudo cp pc-bios/pxe-e1000.bin /usr/share/qemu/ cd ..Now, qemu with SPICE support is installed in /usr/local/bin, and the ordinary system qemu is installed in/usr/bin. We'll make a shortcut command called 'qemu-spice' that you can invoke separately from the system qemu (which doesn't have SPICE support). 以上将含有SPICE 服务的QEMU安装到usr/local/bin(PS:也可能在usr/bin下),普通 QEMU 系统安装在/usr/bin下。以下是创建一个名字叫做qemu-spice的工具,其实是qemu的一个拷贝。
cd /usr/local/binsudo mv qemu qemu-spice至此,server安装完毕。
spicec -h <server hostname> -p <port number>
qemu-spice -spice port=5930,disable-ticketing -drive file=/path/to/image -vga qxl -device AC97 -usbdevice tablet -m 1024 -enable-kvm -net nic -net user注意:file=/path/to/image 要替换为系统的镜像文件,比如我的file=/kvm/vdisk.img
spicec -h <server hostname> -p <port number>就可以在SPICE客户端启动服务机上的虚拟机系统了。 文件,比如我的file=/kvm/vdisk.img
dpkg --get-selections | grep spice可能会有一些内容没安装好,下面是全部安装好的截图.
联系客服