1透敌、查看默認(rèn)的kvm和libvirt版本
rpm -qi libvirt-daemon
rpm -qi qemu-kvm
2、KVM軟件高版本倉庫配置
cat > /etc/yum.repos.d/CentOS-QEMU-EV.repo <<EOF
[centos-qemu-ev]
name=CentOS-$releasever - QEMU EV
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=virt-kvm-common
baseurl=http://mirrors.aliyun.com/$contentdir/$releasever/virt/$basearch/kvm-common/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization
[centos-qemu-ev-test]
name=CentOS-$releasever - QEMU EV Testing
baseurl=http://buildlogs.centos.org/centos/$releasever/virt/$basearch/kvm-common/
gpgcheck=0
enabled=0
EOF
3、libvirt高版本倉庫配置
cat > /etc/yum.repos.d/virt.repo <<EOF
[virt]
name=virt
baseurl=http://mirrors.aliyun.com/centos/7/virt/x86_64/libvirt-latest/
gpgcheck=0
enabled=1
EOF
4酗电、KVM軟件安裝
yum install -y libvirt bridge-utils qemu-kvm-ev qemu-kvm-common-ev virt-manager virt-viewer virt-install libcgroup libcgroup-devel libcgroup-tools
5魄藕、配置Libvirt軟件
sed -i 's/#listen_tls = 0/listen_tls = 0/g' /etc/libvirt/libvirtd.conf
sed -i 's/#listen_tcp = 1/listen_tcp = 1/g' /etc/libvirt/libvirtd.conf
sed -i 's/#auth_tcp = "sasl"/auth_tcp = "none"/g' /etc/libvirt/libvirtd.conf
sed -i 's/#LIBVIRTD_ARGS="--listen"/LIBVIRTD_ARGS="--listen"/g' /etc/sysconfig/libvirtd
6、啟動(dòng)libvirt軟件
systemctl restart libvirtd
7撵术、測試libvirt軟件
virsh -c qemu+tcp://localhost/system nodeinfo
virsh --connect qemu+tcp://localhost/system nodeinfo