KVM安装和使用
一、安装
- 检测硬件是否支持
KVM需要硬件的支持,使用命令查看硬件是否支持KVM。如果结果中有vmx(Intel)或svm(AMD)字样,就说明CPU的支持的
egrep ‘(vmx|svm)’ /proc/cpuinfo

- 关闭selinux
将 /etc/sysconfig/selinux 中的 SELinux=enforcing 修改为 SELinux=disabled
cat /etc/selinux/config 

- 安装前置依赖
yum install epel-release net-tools vim unzip zip wget -y
yum install qemu-kvm libvirt virt-install bridge-utils openssl -y
- 使用lsmod | grep kvm命令验证安装结果,下图说明已经成功安装了
lsmod | grep kvm

- 开启kvm服务
systemctl start libvirtd
- 设置其开机自动启动
systemctl enable libvirtd
- 查看运行状态
systemctl status libvirtd

=========