
Spice or SPICE (abbr. From the English. "Simple Protocol for Independent Computing Environments", that is, "Simple Protocol for an Independent Computing Environment") is an open protocol for remote access to a computer or virtual machine.
Using SPICE allows not only access to the screen, but also to the clipboard and sound card. Currently, the SPICE protocol is in the stage of intensive development, despite this it can already be tried today in a virtual machine running the modified KVM hypervisor instead of the basic open protocol VNC (Virtual Network Computing), which is used by default.
The protocol was originally developed by Qumranet, which was then bought by Red Hat, Inc., which on December 9, 2009, announced its decision to open the source code of the protocol. A stable version of SPICE is available in the Red Hat Enterprise Linux operating system, as a
means of desktop virtualization .
')
Of course, in addition to SPICE and VNC, there are other remote access protocols such as:
- PCoverIP is a protocol developed by Terradici, used in VmWare View.
- RDP (Remote Desktop Protocol) is a protocol developed by Microsoft, used in Microsoft products, Oracle VirtualBox.
Unfortunately, the above protocols are closed and cannot be used freely.
Configure the host
To be able to use SPICE, you should build a virtualization platform based on a modified KVM hypervisor from source or use pre-built packages. In order to independently assemble a virtualization platform from source, it is necessary to use the
instruction posted on the official
website of the project and spend some time.
If you use Ubuntu 11.04 amd64 and do not want to spend time on compilation, you can use pre-assembled deb-packages prepared by
Boris Derzhavets , or deb-packages of the virtualization platform, prepared by the
UmVirt project.
The deb packages of the virtualization platform prepared within the framework of the UmVirt project are created on the basis of more recent versions of the programs and package building rules used by Boris Derzhavets. are fork.
As an environment, you can use not only a real computer on the amd64 platform with a virtualization function, but also an equivalent virtual machine. That allows you to get
multi-level virtualization .
Installation from the repository of Boris Derzhavtsa
To install the virtualization platform from the Boris Derzhavets repository, add the repository using the command:
sudo add-apt-repository ppa:bderzhavets/git-spice
Then update the package information with the command:
sudo apt-get update
Then install the virtualization platform using the command:
sudo apt-get install qemu-kvm virt-manager
Installation from the archive of deb-packages of the UmVirt virtualization platform
To install the deb packages of the UmVirt virtualization platform, download the “UmVirt VP” packages from the project site’s
download page, unpack it and run the installation script as root using the sudo command:
sudo ./install.sh
During the installation process, the installation script will check the environment, automatically install packages and all dependencies.
Using
After you have installed the virtualization platform, you can get started using the virt-manager program, which has an intuitive graphical interface. To avoid problems in work, I recommend running virt-manager as root.
Try creating and running a virtual machine running Ubuntu, pre-adding a sound card to it and changing the remote access protocol from VNC to SPICE.
Then try accessing the virtual machine listening on port 5900 via the cpicec SPICE client by running the following command:
spicec -h 127.0.0.1 -p 5900
As a result, when you start, you should hear the sound from the virtual machine.
Customize guest
To work in a virtual machine was comfortable, you need to install guest add-ons SPICE: QXL video card driver and VD agent. For the Windows operating system, guest add-ons are available on the official
SPICE project website. Some Linux distributions support QXL graphics cards from the beginning, but its driver does not work stably.
For Ubuntu add-ons can be installed from the special repository spice2, prepared by Boris Derzhavets, and from the archive with the installation script prepared by the UmVirt project. Guest additions to the archive, prepared by the UmVirt project, contain a higher quality QXL driver that supports more permissions and a more recent VD agent.
To install guest add-ons from the spice2 repository, the following commands are executed:
sudo add-apt-repository ppa:bderzhavets/spice2
sudo apt-get update
sudo apt-get install spice-vdagent
To install guest add-ons prepared by the UmVirt project, you must download and unpack the add-ons archive from the
download page. Then install them using the command:
sudo ./install.sh
In order to improve interaction with the virtual machine, turn off the virtual machine, change the video card type to QXL and start the virtual machine (if the machine does not start the first time, start it several times). Now you can not only listen to the sound but also watch the video, combine the clipboards.
Finally, some tips to increase productivity:
- Since the Flash player overloads the virtual machine processor for purity of performance testing experiments, when playing videos, use OGV and WebM files, they can be played in Ubuntu initially and do not overload the processor.
- Use network storage to reduce I / O processing time
- Use VirtIO Virtual Devices
For more information, visit the official
SPICE website, as well as the
UmVirt virtualization platform
website .
Sources