错误libvirtError: invalid argument: could not find capabilities for domaintype=kvm
解决方法:
编辑/etc/nova/nova.conf
在[libvirt]
添加
virt_type=qemu
重启openstack-nova-compute
当你的机器支持虚拟机的时候提示这个错误就不要这么处理了
检查机器是否支持虚拟化
[root@node1 ~]# egrep '^flags.*(vmx|svm)' /proc/cpuinfo
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts md_clear spec_ctrl intel_stibp flush_l1d
通过上面可以知道支持硬件虚拟化,但是这里模块少一个kvm_intel
[root@node1 ~]# lsmod | grep kvm
kvm 636965 0
irqbypass 13503 1 kvm
这里错误就很明显了,bios把硬件虚拟化关闭了
[root@node1 ~]# dmesg | grep kvm
[ 22.050403] kvm: disabled by bios
[ 22.069813] kvm: disabled by bios
[ 22.079560] kvm: disabled by bios
[ 22.086424] kvm: disabled by bios
[ 22.093372] kvm: disabled by bios
[ 22.105979] kvm: disabled by bios
[ 22.112845] kvm: disabled by bios
[ 22.120392] kvm: disabled by bios
[ 22.127324] kvm: disabled by bios
[ 22.143490] kvm: disabled by bios
开启硬件虚拟化后,在查看下正常的kvm内核模块
[root@node1 ~]# lsmod | grep kvm
kvm_intel 188688 0
kvm 636965 1 kvm_intel
irqbypass 13503 1 kvm