You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行vagrant up启动虚拟机时遇VT-x相关错误求助

Vagrant启动虚拟机报错(VERR_VMX_MSR_ALL_VMX_DISABLED)解决方法

报错信息

vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/focal64' version '20220804.0.0' 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: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running pre-boot' VM customizations..
==> default: Booting VM...
There was an error while executing 'VBoxManage', CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.

Command: ['startvm', "fOf87cbc-9f24-409f-b1b7-a105544a838c", "--type", "headless"]

Stderr: VBoxManage.exe: error: Not in hypervisor partition (HVP=0 (VERR_NEM_NOT_AVAILABLE).
VBoxManage.exe: error: VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

解决步骤

  • 启用BIOS/UEFI虚拟化功能

    1. 重启电脑,开机时按对应按键进入BIOS/UEFI(戴尔F2、惠普F10、联想F1/F2、华硕Del等,参考开机屏幕提示)。
    2. 找到虚拟化相关选项,如Intel Virtualization Technology (VT-x)、AMD-V或SVM Mode,设置为Enabled。
    3. 保存设置并重启电脑。
  • 关闭Windows Hyper-V(Windows系统适用)

    1. 图形界面方式:打开「控制面板」→「程序」→「程序和功能」→「启用或关闭Windows功能」,取消勾选Hyper-V,确认后重启电脑。
    2. 命令行方式:以管理员身份打开命令提示符,执行:
      bcdedit /set hypervisorlaunchtype off
      
      执行完成后重启电脑。
  • 检查VirtualBox加速设置

    1. 打开VirtualBox,点击「全局设置」→「系统」→「加速」,确认启用VT-x/AMD-V和启用嵌套分页已勾选。
    2. 针对目标虚拟机:选中虚拟机→「设置」→「系统」→「加速」,确认上述选项已勾选。
  • 重新启动虚拟机
    返回命令行,执行以下命令重试:

    vagrant reload
    

    或直接重新执行:

    vagrant up
    

内容的提问来源于stack exchange,提问作者dbnick1

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.22 15:03:51