本文介绍了如何使用QEMU模拟vmx功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从此处中了解到vmx功能必须通过为命令提供+ vmx选项来显式启用对QEMU的支持,但问题是它似乎不起作用.在我的系统中,仍未检测到VMX功能.

I read from here that vmx capability support on QEMU must be explicitly enabled by providing the +vmx option to the command but the problem is that it does not seem to work. In my system, the VMX feature is still undetected.

命令:

qemu-system-x86_64 -no-kvm -cpu qemu64,+vmx,-svm  ...

在客户操作系统中,当我执行cpuid 1时,我得到ECX = 0x80802001;位5 = 0表示我的虚拟CPU没有VMX.

In my guest OS, when I execute cpuid 1 I get ECX = 0x80802001; bit 5 = 0 meaning that my virtual CPU does not have VMX.

这是一个错误吗?

或者还有另一种在QEMU中启用vmx功能的方法吗?

Or is there another way to enable the vmx feature in QEMU?

推荐答案

以下命令对我有用:

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

-cpu host使QEMU报告VM中的主机CPU功能(因此您的CPU必须支持vmx)

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

-enable-kvm-cpu host

即使根据 -cpu qemu64,+vmx应该可以,对我也不起作用.

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

这篇关于如何使用QEMU模拟vmx功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-04 15:22