modprobe -l|grep kvm

yum install gcc autoconf automake libtool -y

yum install glib* zlib* -y



libvirt编译时候的问题:

#问题1:You must install the libyajl library & headers to compile libvirt

git clone git://github.com/lloyd/yajl

cd yajl

./configure && make && make install


#问题2:configure: error: You must install the device-mapper-devel

yum install device-mapper-devel device-mapper -y


#问题3:configure: error: You must install the pciaccess module to build with udev

yum install libpciaccess-devel libpciaccess -y


make时候的问题:

/home/libvirt-2.0.0/src/.libs/libvirt.so: undefined reference to `curl_multi_wait'

collect2: ld returned 1 exit status

make[3]: *** [libvirtd] Error 1

make[3]: Leaving directory `/home/libvirt-2.0.0/daemon'

make[2]: *** [all] Error 2

make[2]: Leaving directory `/home/libvirt-2.0.0/daemon'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/home/libvirt-2.0.0'

make: *** [all] Error 2







#创建KVM

virt-install \

--name=guest1-centos6-64 \

--file=/var/lib/libvirt/p_w_picpaths/guest1-rhel5-64.dsk \

--file-size=8 \

--nonsparse --graphics spice \

--vcpus=2 --ram=2048 \

--location=http://example1.com/installation_tree/RHEL5.6-Serverx86_64/os \

--network bridge=br0 \

--os-type=linux \

--os-variant=rhel5.4

待解决。