首页 > 代码库 > centos7升级qemu-kvm,源码

centos7升级qemu-kvm,源码

先卸载qemu-kvm

yum –y remove qemu-kvm

 

源码地址:http://wiki.qemu.org/Download

 

下载源码

wget http://wiki.qemu-project.org/download/qemu-2.8.0-rc0.tar.bz2

 

 

安装依赖包

yum -y install gcc gcc-c++ automake libtool zlib-devel glib2-devel bzip2-devel libuuid-devel spice-protocol spice-server-devel usbredir-devel libaio-devel

 

编译安装

tar xf qemu-2.8.0.tar.bz2

cd qemu-2.8.0

./configure --enable-usb-redir --enable-libusb --enable-spice --enable-uuid --enable-kvm --enable-bzip2 --prefix=/usr/local/qemu --enable-linux-aio --enable-system

make && make install

 

编译完成之后 做链接

# ln -s /usr/local/qemu/bin/qemu-system-x86_64 /usr/bin/qemu-kvm

# ln -s /usr/local/qemu/bin/qemu-system-x86_64 /usr/libexec/qemu-kvm

# ln -s /usr/local/qemu/bin/qemu-img /usr/bin/qemu-img

 

查看当前qemu版本,可以看到当前版本为2.8

qemu-img  --version

qemu-kvm –version

 

编译过程遇到的错误

cd /home/src/qemu-2.8.0/pixman; autoreconf -v --install)/bin/sh: autoreconf: command not found
make: *** [/home/src/qemu-2.8.0/pixman/configure] Error 127

解决方法: yum –y install automake

 

configure.ac:75: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

 

解决方法 yum –y install libtool

centos7升级qemu-kvm,源码