标准错误:VBoxManage.exe:错误:VT-x不可用(VERR_VMX_NO_VMX)

4
 PS C:\vagrant_projects> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'opentable/win-2012r2-standard-amd64-nocm' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
   default: Adapter 1: nat
==> default: Forwarding ports...
   default: 5985 (guest) => 55985 (host) (adapter 1)
   default: 5986 (guest) => 55986 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "efff1950-9700-4fbf-8ab8-7a8ed3f31740", "--type", "headless"]

Stderr: VBoxManage.exe: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

当我尝试使用"vagrant up"命令启动win-2012r2-standard-amd64-nocm虚拟机时,遇到了上述问题。

1个回答

2
我也遇到了这个问题,找到了这篇文章:https://forums.virtualbox.org/viewtopic.php?f=6&t=58820(如果它对您有帮助)。
我尝试关闭VT-x:

PS C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe modifyvm 0150_default_1465225816011_20737 --paravirtprovider off --hwvirtex off

(longmode似乎无关紧要)
但是然后我遇到了这个问题:Vagrant stuck connection timeout retrying 基本上,虚拟机启动了一个64位系统,如果你关闭VT-x,你的虚拟机无法启动64位系统。
最终结果是我需要卸载(而不仅是禁用)Hyper-V。
事实证明,Hyper-V会禁用VT-x(如果您进行任何Android开发,则已遇到此问题。听起来最近的Windows / Hyper-V版本甚至不能被禁用,必须完全安装)。
此选项在“程序和功能”>“打开或关闭Windows功能”中找到。
更多信息: https://social.technet.microsoft.com/Forums/windows/en-US/118561b9-7155-46e3-a874-6a38b35c67fd/hyperv-disables-vtx-for-other-hypervisors?forum=w8itprogeneral

在我的情况下,在控制面板的“打开或关闭Windows功能”部分取消选中Hyper-V框/复选框并重新启动计算机后,运行“vagrant up”仍然会抛出相同的错误消息。有什么想法吗?谢谢。 https://dev59.com/sloT5IYBdhLWcg3w-TRV?noredirect=1#comment63360399_37955942 - AKS
1
抱歉,我相信你现在已经解决了这个问题,但以防万一你还没有解决,@ArunSangal =>在Windows 10中,你必须完全卸载Hyper-V才能停止拦截VT-x请求并返回“false”。你不能只是关闭它。希望这可以帮到你... - MaddHacker
是的,我也不得不这样做。 - AKS

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接