Trying free spice virtualization in Ubuntu 11.04 amd64
Spice or SPICE (abbr. From the English. "Simple Protocol for Independent Computing Environments", that is, "Simple Protocol for an independent computing environment") - 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 under intensive development, despite this, you can try to use it today in a virtual machine running a modified KVM hypervisor instead of the basic open protocol VNC (Virtual Network Computing), which is used by default.
The protocol was originally developed by the Qumranet campaign, which was then bought by Red Hat, Inc, which announced on December 9, 2009 a decision to open the protocol source code. The stable version of SPICE is available on Red Hat Enterprise Linux as a desktop virtualization tool .
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) - a protocol developed by Microsoft, used in Microsoft products, Oracle VirtualBox.
Unfortunately, the above protocols are closed and cannot be used freely.
Configure host
To be able to use SPICE, you should build a virtualization platform based on a modified KVM hypervisor from the sources or use pre-built packages. In order to independently assemble the virtualization platform from the sources, you need to use the instructions posted on the official website of the project and spend some time.
If you are using Ubuntu 11.04 amd64 and don’t want to waste time compiling, you can use pre-compiled deb packages prepared by Boris Derzhavets , or deb packages of the virtualization platform prepared by the UmVirt project .
virtualization platform deb packages prepared as part of the UmVirt project were created on the basis of more recent versions of programs and package building rules used by Boris Derzhavets i.e. are fork.
As an environment, you can use not only a real computer based on amd64 with virtualization, but also an equivalent virtual machine. That allows you to get multi-level virtualization .
Installation from the repository of Boris Derzhavets
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 using the command:
sudo apt-get update
Then install the virtualization platform using the command:
sudo apt-get install qemu-kvm virt-manager
Installing UmVirt Virtualization Platform Deb Pack Archive
To install UmVirt virtualization platform deb packages, download the “UmVirt VP” package archive from the project website download page, unpack it and run the installation script as root using the sudo command:
sudo ./install.sh
During installation, the installation script will check the environment, automatically install the packages and all the dependencies .
Using
Once you have installed the virtualization platform, you can get started with 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 by first adding a sound card to it and changing the remote access protocol from VNC to SPICE.
Then try to access the virtual machine listening on port 5900 through the cpicec SPICE client by running the following command:
spicec -h 127.0.0.1 -p 5900
As a result, at startup you should hear sound from the virtual machine.
Customize the guest
To work in a virtual machine it was comfortable, you need to install the SPICE guest add-ons: 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 initially support a QXL graphics card, but its driver does not work stably.
For Ubuntu, add-ons can be installed from the special spice2 repository prepared by Boris Derzhavets, and from the archive with the installation script prepared by the UmVirt project. Guest additions in 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 need to download and unzip 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 car will not start the first time, start it several times). Now you can listen to not only sound but also watch videos, combine clipboards.
In conclusion, some tips for increasing productivity:
- Since the Flash player overloads the processor of the virtual machine for the purity of the performance verification experiments, when playing video, use OGV and WebM file formats; they can be played in Ubuntu initially and do not overload the processor.
- Use Network Attached Storage to Reduce Processor I / O Costs
- Use VirtIO Virtual Devices
For more information, visit the official SPICE website , as well as the website of the UmVirt virtualization platform .