Compile and install qemu-kvm and enable spice in ubuntu12.04

Source: Internet
Author: User

Install

Apt-get install build-essential

This qem-kvm version is qemu-kvm-1.2.0

Http://sourceforge.net/projects/kvm/files/qemu-kvm/

Extract

Tar-xzf qemu-kvm-1.2.0.tar.gz

Root @ compute :~ # Cd qemu-kvm-1.2.0/

You can run the./configure-help command to view the help information.
Root @ compute :~ Qemu-kvm-1.2.0 #./configure
Install prefix/usr/local
BIOS directory/usr/local/share/qemu
Binary directory/usr/local/bin
Library directory/usr/local/lib
Include directory/usr/local/include
Config directory/usr/local/etc
Manual directory/usr/local/share/man
ELF interp prefix/usr/gnemul/qemu-% M

<! -The output of other rows of help information is omitted here.->

VNC support yes # You Can See That vnc is supported by default.
Vnc tls support yes
Vnc sasl support yes
Vnc jpeg support yes
Vnc png support no

......

Spice support no # You Can See That spice is not supported by default.
Rbd support no
Xfsctl support no
Nss used yes
Usb net redir no
OpenGL support no

The following error is prompted when spice is supported for manual configuration.

Root @ openstack-nova :~ /Qemu-kvm-1.2.0 #./configure -- enable-spice
ERROR
ERROR: User requested feature spice
ERROR: configure was not able to find it
ERROR

Spice-server and spice-protocol need to be installed

Spice-0.12.2.tar.bz2 and spice-protocol-0.12.5.tar.bz2

Http://spice-space.org/download/releases/

Decompress configuration and install

Tar-xjf spice-0.12.2.tar.bz2

D spice-0.12.2

./Configure

Make; make install

Some packages cannot be found during configure, so install apt-get install one by one as prompted.

Some packages may not match the prompt name and the apt-get prompt package. lib is added in front. If not, you need to download the deb package for manual installation or source code installation.

For exampleCelt051Packet-caused error

Checking for celt051... no
Configure: error: Package requirements (celt051> = 0.5.1.1) were not met:
No package 'celt051 'found

Celt_0.5.1.3.orig.tar.gz

Https://launchpad.net /~ Dev-zero/+ archive/spice/+ packages

Decompress configure; make install

AndAlsaRelated packages libasound2-dev and SSL and xrandroid

Apt-get install libasound2-dev libssl-dev libxrandroid-dev

X_misc is a graph-related package.

Apt-get install libxfixes-dev libxrender-dev x11proto-core-dev

Jpeg, saslRelated packages

Apt-get install libjpeg62-dev libsasl2-dev

Spice-server and spice-protocol after compilation and Installation

Configure qemu-kvm again

Root @ compute :~ /Qemu-kvm-1.2.0 #./configure -- enable-spice

Compile and install

Make

Sudo make install

The Installation Process of qemu-kvm is mainly to create some directories of qemu, copy some configuration files to the corresponding directories, and copy some firmware files (such as sgabios. bin, kvmvapic. bin) to the directory so that the qemu-kvm command line can find the corresponding firmware for the client to use at startup, copy keymaps to the appropriate directory to support a variety of required keyboard types in the client, copy executable programs such as qemu-system-x86_64, qemu-img to the corresponding directory

OK. The compilation is successful.

Go to the following directory

Root @ compute :~ /Qemu-kvm-1.2.0/x86_64-softmmu #

We can see that there is finally a compilation of the qemu-system-x86_64 File

You can use the terminal to access the created virtual machine.

./Qemu-system-x86_64-m 1024-drive file =/root/xp. raw, index = 0,-boot c-spice port = 5907, disable-ticketing



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.