How do I emulate the vmx feature with QEMU?

China☆狼群 提交于 2019-12-02 00:39:43
Mike

The following command works for me:

qemu-system-x86_64 -cpu host -kernel kernel/kernel -serial stdio -enable-kvm

-cpu host makes QEMU report host CPU features inside the VM (so your CPU must support vmx)

-enable-kvm is required by -cpu host

Even though according to this -cpu qemu64,+vmx should work, it doesn't work for me either.

Low power

No, the vmx flag is not supported in the processor emulation mode of QEMU. In order to use vmx in QEMU, you must use KVM with QEMU (replacing -no-kvm with -enable-kvm); and your host processor must support vmx.

In this document it shows the nested vmx instructions support in the Linux KVM; meaning this feature must be used with -enable-kvm.

In my test the options -enable-kvm -cpu kvm64,+vmx work, as the vmx feature is detected in the guest OS.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!