>/Hi guys/ >// >/i encountered a problem when i test vmx related cases/ >// >/the test log like below/ >/[adam@skylake kvm-unit-tests]$ ./run_tests.sh/ >/SKIP vmx_null (0 tests)/ >/[adam@skylake kvm-unit-tests]$ cat logs// >/SUMMARY vmx_null.log/ >/[adam@skylake kvm-unit-tests]$ cat logs/vmx_null.log/ >/warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]/ >/timeout -k 1s --foreground 90s /usr/bin/qemu-system-x86_64 -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel x86/vmx.flat -smp 1 -cpu host,+vmx -append null # -initrd /tmp/tmp.wTXf483ild/ >/enabling apic/ >/paging enabled/ >/cr0 = 80010011/ >/cr3 = 469000/ >/cr4 = 20/ >/WARNING: vmx not supported, add '-cpu host'/ >/SUMMARY: 0 tests/ >// >/why the test output this warning, my skylake i5-6500 machine can support vmx feature, and how i can fix it./ The warning means that KVM doesn't allow the guest to see the vmx feature. You are most likely without nested vmx, because it is disabled by default: % cat /sys/module/kvm_intel/parameters/nested N In order to turn it on, reload the "kvm_intel" module with "nested=Y" parameter. modprobe -r kvm_intel; modprobe kvm_intel nested=y
Thank you very much, it works for me
If you want to have this automatically, add options kvm_intel nested=1 to /etc/modprobe.d/kvm.conf. >/i tried the same test at my another haswell(i7-4790) machine(has the same kernel) doesn't occur this issue./ Not sure why it works on the other machine -- is it a different distro?
you are right, the skylake is Archlinux while the haswell is Ubuntu. Thanks Zhijian
Thanks.