参考

1.查看cpu是否支持虚拟化技术

egrep 'vmx|svm' /proc/cpuinfo

2.内核rhel6以上

uname -r

3.清理之前安装的虚拟化环境

  1. yum remove `rpm -qa |egrep 'qemu|kvm|virt'`
  2. rm -rf /var/lib/libvirt /etc/libvirt/

4.安装

  1. centos6
  2. yum groupinstall "Virtualization" "Virtualization Client" "Virtualization Platform" "Virtualization Tools" -y
  3. centos7
  4. yum -y install qemu-kvm qemu-kvm-tools qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils libguestfs-tools
  5. #yum install *qemu* *virt* *kvm* -y

5、启动服务

  1. centos6:
  2. # /etc/init.d/libvirtd start
  3. centos7:
  4. # systemctl start libvirtd

通过cockpit安装也可以安装虚拟机

  1. yum install cockpitsy
  2. stemctl start cockpit