1. 检查CPU是否支持硬件辅助虚拟化
~~~
egrep '^flags.*(vmx|svm)' /proc/cpuinfo
~~~
2. 安装所需的包
~~~
# yum install qemu-kvm qemu-img virt-manager libvirt libvirt-python python-virtinst libvirt-client
~~~
3. 检查BIOS是否禁用了虚拟化支持,如果是,修改BIOS设置。
~~~
[root@dhcp-192-114 ~]# dmesg | grep kvm
[ 10.737953] kvm: disabled by bios
[ 10.756640] kvm: disabled by bios
[ 1078.359177] kvm: disabled by bios
[ 1081.517789] kvm: disabled by bios
~~~
4. 检查内核模块
~~~
[root@dhcp-192-114 ~]# lsmod | grep kvm
kvm_intel 138567 3
kvm 441119 1 kvm_intel
~~~