- 浏览: 86199 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (78)
- 生活 (3)
- 云计算与虚拟化 (26)
- IT技术 (13)
- VDI (7)
- WEB 2.0 (3)
- social network (1)
- API (1)
- java (1)
- tools (1)
- javascript (3)
- framework (1)
- web (1)
- virtualization (3)
- hypervisor (1)
- linux (6)
- kvm (1)
- VDI,vmware (2)
- wine (1)
- android (4)
- NoSQL (1)
- version control (1)
- (1)
- xendesktop (1)
- citrix (1)
- mobile (2)
- ebook (1)
- GUI (2)
- C# (1)
- google map (1)
- 围棋 (1)
- coding (1)
- programming (1)
最新评论
SPICE在ubuntu上的实现
SPICE的安装过程,参照:http://docs.cslabs.clarkson.edu/wiki/SPICE的介绍,依赖包中。应该另外安装libjpeg-dev包。
Overview
SPICE is a protocol that allows for high-quality virtual machine access using VDI over a network. It could be used as a communication layer between thin clients and their associated virtualized operating systems, or it could be used as it is in the COSI lab for normal machines to have quick access to a variety of different operating systems, or in any other configuration where it is better for a virtual machine to be running remotely.
SPICE on Ubuntu
As SPICE is under development by Red Hat, binary packages are rpm-based. However, it is possible to run both the SPICE server and client on 64-bit Ubuntu machines, if they are compiled from source. There are several dependencies that must be installed before SPICE can be compiled; dependencies not already available in the standard Ubuntu repositories must also be compiled from source. Please follow the instructions below to compile the SPICE server and client.
These instructions are for installing SPICE 0.6 on 64-bit Ubuntu 10.04. It is not possible to install a SPICE server on any 32-bit system due to its reliance on 64-bit atomic operations, and the process for installing just the client on 32-bit systems no longer appears to be supported.
Please direct comments or questions about this guide to Mark Platek.
Initial set-up
Some standard tools are required:
sudo apt-get install build-essential autoconf git-core
Also, install some dependencies from the repositories:
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
Finally, create a directory to compile from and descend into it:
mkdir spice-sources
cd spice-sources
Installing Dependencies
Spice protocol headers
The first dependency to install is the spice protocol headers.
wget http://spice-space.org/download/releases/spice-protocol-0.6.0.tar.gz
tar xvf spice-protocol-0.6.0.tar.gz
cd spice-protocol-0.6.0/
./configure
make
sudo make install
cd ..
qpixman and pixman
SPICE requires a special version of pixman unavailable in the Ubuntu repositories. It is available from the SPICE homepage.
wget http://spice-space.org/download/stable/qpixman-0.13.3-git20090127.tar.bz2
tar xvf qpixman-0.13.3-git20090127.tar.bz2
cd qpixman-0.13.3-git20090127/
./autogen.sh -includedir=/usr/include --libdir=/usr/lib64
make
sudo make install
cd ..
We must also install a newer version of the normal pixman library, available from the SPICE project's git repository.
git clone git://anongit.freedesktop.org/pixman
cd pixman/
./autogen.sh --includedir=/usr/include --libdir=/usr/lib64
make
sudo make install
cd ..
celt
SPICE requires a specific version of the celt audio codec (0.5.1.3). Since it is unavailable in the Ubuntu repositories, it must also be compiled.
wget http://downloads.us.xiph.org/releases/celt/celt-0.5.1.3.tar.gz
tar xvf celt-0.5.1.3.tar.gz
cd celt-0.5.1.3/
./configure --includedir=/usr/include --libdir=/usr/lib64
make
sudo make install
cd ..
qcairo
SPICE requires a modified version of the cairo graphics library, named qcairo. Sources are available on the spice homepage.
wget http://spice-space.org/download/stable/qcairo-1.8.7.1-git74d6b5.tar.bz2
tar xvf qcairo-1.8.7.1-git74d6b5.tar.bz2
cd qcairo-1.8.7.1-git74d6b5/
./autogen.sh --disable-xlib --disable-ps --disable-pdf --disable-svg --includedir=/usr/include --libdir=/usr/lib64
make
sudo make install
cd ..
Installing SPICE
libspice and the SPICE client
Finally, all of the dependencies are satisfied and we can install the SPICE server. It comes in two parts: one part is libspice (we will later compile a new version of qemu with spice support to use it), and the other is the spice client. They are both installed at the same time.
NOTE: This section can only be performed on a 64-bit system! Client-only installation on a 32-bit system no longer appears to be supported.
wget http://spice-space.org/download/releases/spice-0.6.0.tar.gz
tar xf spice-0.6.0.tar.gz
cd spice-0.6.0/
./configure --includedir=/usr/include --libdir=/usr/lib64
make
sudo make install
cd ..
"Spiced" QEMU
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 documentation the branch number is in flux and is subject to change.
This whole subsection should be done as root, to avoid exposing /opt to ordinary users. If you don't want to work as root, prepend each command with sudo.
cd /opt
mkdir qemu-spice
cd qemu-spice/
git clone git://git.freedesktop.org/git/spice/qemu
cd 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-thread
make
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 invoke qemu-spice with 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.
Appendix: Ubuntu SPICE PPA
In past revisions of this page, Adam J. Lincoln's PPA containing debian packages for qcairo, qpixman, etc. and the spice client was mentioned. It no longer appears to be actively maintained, and almost certainly carries an old, incompatible version of SPICE (0.4). If you wish to use SPICE, please compile it from source using the method described above
How To Use SPICE
Client
To invoke the spice client, use the command
spicec -h <server hostname> -p <port number>
Server
Invoking the spice server is rather more complex than the client, since you have to set the parameters of the virtualized guest. For example,
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
will start a SPICE server VM on port 5930 from the image at the supplied path, with:
qxl graphics (you need this for spice to be of any use)
an AC97 sound device
a tablet input device (using a virtualized tablet generally gives better results than a virtualized mouse)
1024M of memory available
KVM support enabled (you really want this, as the guest is quite slow otherwise)
a user-controllable virtualized nic
It is also possible to use virtio if your system supports it; doing so will lead to significant performance gains for the guest. Modify the-drive argument like so:
-drive file=/path/to/image,if=virtio
And, modify the -net argument like so:
-net nic,model=virtio
When a SPICE server is started, its virtual guest boots and at any point until the guest is shut down a client can connect to and interact with the guest.
Special instructions for using a Windows guest
SPICE aims to provide a high-quality interface between the remote client and the guest VM. To this end, a SPICE-specific Windows driver has been written to enable smooth operation of the mouse, eliminating the "choppiness" that has before been a problem when running an XP guest. When you boot the SPICE Windows guest, follow these instructions to enable it. Note that you must start the guest with option -vga qxl in order for the mouse driver to work.
SPICE的安装过程,参照:http://docs.cslabs.clarkson.edu/wiki/SPICE的介绍,依赖包中。应该另外安装libjpeg-dev包。
Overview
SPICE is a protocol that allows for high-quality virtual machine access using VDI over a network. It could be used as a communication layer between thin clients and their associated virtualized operating systems, or it could be used as it is in the COSI lab for normal machines to have quick access to a variety of different operating systems, or in any other configuration where it is better for a virtual machine to be running remotely.
SPICE on Ubuntu
As SPICE is under development by Red Hat, binary packages are rpm-based. However, it is possible to run both the SPICE server and client on 64-bit Ubuntu machines, if they are compiled from source. There are several dependencies that must be installed before SPICE can be compiled; dependencies not already available in the standard Ubuntu repositories must also be compiled from source. Please follow the instructions below to compile the SPICE server and client.
These instructions are for installing SPICE 0.6 on 64-bit Ubuntu 10.04. It is not possible to install a SPICE server on any 32-bit system due to its reliance on 64-bit atomic operations, and the process for installing just the client on 32-bit systems no longer appears to be supported.
Please direct comments or questions about this guide to Mark Platek.
Initial set-up
Some standard tools are required:
sudo apt-get install build-essential autoconf git-core
Also, install some dependencies from the repositories:
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
Finally, create a directory to compile from and descend into it:
mkdir spice-sources
cd spice-sources
Installing Dependencies
Spice protocol headers
The first dependency to install is the spice protocol headers.
wget http://spice-space.org/download/releases/spice-protocol-0.6.0.tar.gz
tar xvf spice-protocol-0.6.0.tar.gz
cd spice-protocol-0.6.0/
./configure
make
sudo make install
cd ..
qpixman and pixman
SPICE requires a special version of pixman unavailable in the Ubuntu repositories. It is available from the SPICE homepage.
wget http://spice-space.org/download/stable/qpixman-0.13.3-git20090127.tar.bz2
tar xvf qpixman-0.13.3-git20090127.tar.bz2
cd qpixman-0.13.3-git20090127/
./autogen.sh -includedir=/usr/include --libdir=/usr/lib64
make
sudo make install
cd ..
We must also install a newer version of the normal pixman library, available from the SPICE project's git repository.
git clone git://anongit.freedesktop.org/pixman
cd pixman/
./autogen.sh --includedir=/usr/include --libdir=/usr/lib64
make
sudo make install
cd ..
celt
SPICE requires a specific version of the celt audio codec (0.5.1.3). Since it is unavailable in the Ubuntu repositories, it must also be compiled.
wget http://downloads.us.xiph.org/releases/celt/celt-0.5.1.3.tar.gz
tar xvf celt-0.5.1.3.tar.gz
cd celt-0.5.1.3/
./configure --includedir=/usr/include --libdir=/usr/lib64
make
sudo make install
cd ..
qcairo
SPICE requires a modified version of the cairo graphics library, named qcairo. Sources are available on the spice homepage.
wget http://spice-space.org/download/stable/qcairo-1.8.7.1-git74d6b5.tar.bz2
tar xvf qcairo-1.8.7.1-git74d6b5.tar.bz2
cd qcairo-1.8.7.1-git74d6b5/
./autogen.sh --disable-xlib --disable-ps --disable-pdf --disable-svg --includedir=/usr/include --libdir=/usr/lib64
make
sudo make install
cd ..
Installing SPICE
libspice and the SPICE client
Finally, all of the dependencies are satisfied and we can install the SPICE server. It comes in two parts: one part is libspice (we will later compile a new version of qemu with spice support to use it), and the other is the spice client. They are both installed at the same time.
NOTE: This section can only be performed on a 64-bit system! Client-only installation on a 32-bit system no longer appears to be supported.
wget http://spice-space.org/download/releases/spice-0.6.0.tar.gz
tar xf spice-0.6.0.tar.gz
cd spice-0.6.0/
./configure --includedir=/usr/include --libdir=/usr/lib64
make
sudo make install
cd ..
"Spiced" QEMU
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 documentation the branch number is in flux and is subject to change.
This whole subsection should be done as root, to avoid exposing /opt to ordinary users. If you don't want to work as root, prepend each command with sudo.
cd /opt
mkdir qemu-spice
cd qemu-spice/
git clone git://git.freedesktop.org/git/spice/qemu
cd 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-thread
make
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 invoke qemu-spice with 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.
Appendix: Ubuntu SPICE PPA
In past revisions of this page, Adam J. Lincoln's PPA containing debian packages for qcairo, qpixman, etc. and the spice client was mentioned. It no longer appears to be actively maintained, and almost certainly carries an old, incompatible version of SPICE (0.4). If you wish to use SPICE, please compile it from source using the method described above
How To Use SPICE
Client
To invoke the spice client, use the command
spicec -h <server hostname> -p <port number>
Server
Invoking the spice server is rather more complex than the client, since you have to set the parameters of the virtualized guest. For example,
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
will start a SPICE server VM on port 5930 from the image at the supplied path, with:
qxl graphics (you need this for spice to be of any use)
an AC97 sound device
a tablet input device (using a virtualized tablet generally gives better results than a virtualized mouse)
1024M of memory available
KVM support enabled (you really want this, as the guest is quite slow otherwise)
a user-controllable virtualized nic
It is also possible to use virtio if your system supports it; doing so will lead to significant performance gains for the guest. Modify the-drive argument like so:
-drive file=/path/to/image,if=virtio
And, modify the -net argument like so:
-net nic,model=virtio
When a SPICE server is started, its virtual guest boots and at any point until the guest is shut down a client can connect to and interact with the guest.
Special instructions for using a Windows guest
SPICE aims to provide a high-quality interface between the remote client and the guest VM. To this end, a SPICE-specific Windows driver has been written to enable smooth operation of the mouse, eliminating the "choppiness" that has before been a problem when running an XP guest. When you boot the SPICE Windows guest, follow these instructions to enable it. Note that you must start the guest with option -vga qxl in order for the mouse driver to work.
发表评论
-
转:View Calculator
2012-06-30 22:22 840View Calculator Check ou ... -
转:深入浅出桌面虚拟化存储性能的评估
2012-04-10 10:03 1244深入浅出桌面虚拟化存 ... -
转:Windows and GPT FAQ
2011-09-19 19:22 1151Windows and GPT FAQ Windows an ... -
转:操作系统虚拟化之KVM
2011-08-19 10:22 1124操作系统虚拟化之KVM KVM(Kernel-based V ... -
转:传统桌面到虚拟桌面的数据迁移
2011-06-17 16:24 930传统桌面到虚拟桌面的数据迁移 传统桌面到虚拟桌面的数据迁移 ... -
SPICE在ubuntu上,Guest机的配置。
2011-06-16 12:00 3115SPICE在ubuntu上,Guest机的 ...
相关推荐
两天时间去研究spice协议,网上资料很少,没有系统的介绍spice的编译环境,现在从0整理,并对库的依赖都一一说明,最终实现了基于spice协议下对桌面的虚拟化操作
在linux系统下(包括CentOS、Ubuntu等)编译QEMU和SPICE协议,使其支持USB重定向。
利用python实现了一个简易的spice仿真工具,支持线性元件和非线性元件的op、dc、ac、tran仿真
spice 客户端 用于spicy远程链接,编译时,可支持USB重定向支持
SPICE (Simple Protocol for Independent Computing Environment)协议的C语言详细定义。
openstack spice协议 服务器客户端安装spice。 spice协议,spice server,spice客户端
If you are generally unfamiliar with how to use Spice, or are not familiar with all of its features then Chapter 2 and Chapter 3 are provided to get you started. The aim in Chapter 2 is just to help ...
在用PSpice进行仿真时,很多时候会遇到需要仿真的器件在PSpice自带的仿真库无法找到。...下面介绍了一个方法,只需简单几步即可实现将不同类型的SPICE Model(*.mod/*.txt/*.cir等文本文件)转换成*.lib、*.olb文件。
The IBIS to SPICE application generates SPICE models from IBIS (I/O Buffer Information Specification) data sheets. It reads a template file to define the SPICE models to be generate. The template file...
the spice doa estimation algorithm
SPICE基本元器件模型参数介绍,注意是英文的,但对想学SPICE仿真的朋友应该没问题哦!
SPICE的安装和使用,方便初次使用SIPCE的用户
Windows版的spice客户端
通过仿真您的电路,您可以在过程的早期发现错误,并避免代价昂贵的、极为耗时的重新进行原型构造的工作。您也可以方便地更换部件以评估不同材料(BOM)的设计方案。 NI Multisim是一个易于使用的、功能强大的、灵活...
LT-spice教程 电气电子仿真软件 软件操作讲义 电路原理仿真
该方法可以解决 ARM 架构的瘦客户机上播放高清视频的难题,提高用户体验,并且可以应用于其他硬件平台的 ARM 终端,通过在 I.MX53 平台上验证,实现了在云桌面上流畅播放高清视频。 KEY WORDS: 云桌面;SPICE 协议...
很好的SPICE仿真学习资料!!! 不过还没看完,相信很多朋友需要!
在pspice中如何使用厂家提供的spice模型的概述
IXYS公司官网SPICE模型库,用语SPICE仿真
SPICE 服务器:SPICE 服务器是运行在虚拟机宿主机上的软件,负责将虚拟机的图形和音频数据传输到客户端,并将客户端的输入传递给虚拟机。 通过 SPICE 项目,用户可以轻松地远程访问虚拟机,并享受流和音频播放体验。...