执行 `VBoxManage` 时出错,这是 Vagrant 用于控制 VirtualBox 的 CLI。 windows 10
There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. windows 10
我昨天刚用 powershell 得到 laravel homestead 到 运行。现在,它甚至不会 运行。我刚刚暂停了 vagrant 并关闭了我的电脑。现在它只是给我这个错误:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "b21f2dd0-7f73-4d0f-b1e0-0f82ecdda1fe",
"--natpf1", "delete", "ssh", "--natpf1", "delete", "tcp33060",
"--natpf1", "delete", "tcp44300", "--natpf1", "delete", "tcp54320",
"--natpf1", "delete", "tcp8000"]
Stderr: VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified
error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session,
LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp
好的,所以我终于解决了这个问题。尝试重新启动我的笔记本电脑,它不再给我那个错误了。这是我所做的:
- 在 windows 桌面上右键单击 "This PC" / "My Computer"
- Select "Properties"
- 转到 "Advanced" 选项卡
- 点击底部的"Environment Variables..."
- 在系统变量下单击 "New..."
- 将"Variable name"设置为"VBOX_INSTALL_PATH"
- 将"Variable value"设置为"C:\Program Files\Oracle\VirtualBox\"
- Select "OK" 并关闭所有其他设置 windows
我遇到了同样的问题,之前的答案对我不起作用。
我打开 VirtualBox GUI,看到虚拟机是 运行。我停止了它,然后执行了“vagrant up”。一切正常。
尝试按照以下步骤操作
1. 运行 以管理员身份执行命令
2.流浪停止
3. 流浪起来
4. 如果需要 vagrant provision 但一旦 vagrant 启动。
- 首先用vagrant destroy破坏虚拟盒子。
- 导航到
C:\Users\Justice
用用户名替换正义。
- 删除
.vagrant.d
文件夹。
- 进入
VirtualBox
VMs 文件夹并删除其中的所有内容。
- 用 vagrant up 重新开始。
它应该可以正常工作。
对于 Mac OS,关闭所有 运行 虚拟机并使用以下命令重新启动虚拟框:
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
禁用在 Windows 中启用的 Hyper-V 虚拟化。
以管理员身份打开命令提示符并运行以下命令:
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
之后,重新启动 PC 并再次尝试 VirtualBox。
Windows更新后,我也遇到了这个问题,我认为是VirtualBox的问题。我的解决方案是重新安装 VirtualBox。
还要确保 VirtualBox 目录路径 C:\Program Files\Oracle\VirtualBox\
在 PATH
环境变量中。
对我来说,重启机器就解决了问题。我刚刚安装了 VirtualBox,可能路径设置不正确。
我遇到了同样的问题,我只需要在计算机的 BIOS 中启用 硬件虚拟化 ,如 Laravel documentation.
中所述
If you are using Windows, you may need to enable hardware virtualization (VT-x). It can usually be enabled via your BIOS. If you are using Hyper-V on a UEFI system you may additionally need to disable Hyper-V in order to access VT-x.
只需在安全和隐私中启用 VirtualBox 的权限
提供我在这个问题上的经验可能为时已晚。您可能必须重新启动计算机并在安装 virtualbox 后确保环境变量的值为“C:\Program Files\Oracle\VirtualBox”
System Variable Entry
并且系统变量中的路径条目应该有 %VBOX_MSI_INSTALL_PATH%
%VBOX_MSI_INSTALL_PATH%
仅限 MACOS 用户 -> 我遇到了同样的问题
只需在 Oracle 的安全和隐私中启用 VirtualBox 的权限即可。
- 以管理员身份打开 PowerShell 或 cmd
- 写
bcdedit /set hypervisorlaunchtype off
- 重启
我的错误:
Stderr: VBoxManage.exe: error: Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter' (VERR_INTNET_FLT_IF_NOT_FOUND).
VBoxManage.exe: error: Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
我首先尝试禁用“VirtualBox Host-Only”适配器。没用。然后尝试将 virtualbox 从 6.1.28 降级到 6.1.26,但没有用。删除所有内容并从 6.1.26 重新开始,仍然没有用。兜兜转转一段时间后,我意识到还有另一个我没有禁用的适配器,名为“Ethernet 5”,带有“VirtualBox Host-Only ...”描述。不确定它是否是我第一次创建的 运行 virtualbox 6.1.28,但在我禁用它之后,它起作用了。注意到在那之后创建了另一个(“Ethernet 6”),所以很确定第一个问题与 6.1.28 的其他问题相同,然后错误发生了变化到我上面发布的内容。
在“控制面板”>“网络和 Internet”>“网络连接”下禁用所有 VirtualBox Host-Only 以太网适配器#*。
如果您的可用磁盘空间不足 space,您可能会遇到此错误。
我昨天刚用 powershell 得到 laravel homestead 到 运行。现在,它甚至不会 运行。我刚刚暂停了 vagrant 并关闭了我的电脑。现在它只是给我这个错误:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "b21f2dd0-7f73-4d0f-b1e0-0f82ecdda1fe",
"--natpf1", "delete", "ssh", "--natpf1", "delete", "tcp33060",
"--natpf1", "delete", "tcp44300", "--natpf1", "delete", "tcp54320",
"--natpf1", "delete", "tcp8000"]
Stderr: VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified
error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session,
LockType_Write)" at line 493 of file VBoxManageModifyVM.cpp
好的,所以我终于解决了这个问题。尝试重新启动我的笔记本电脑,它不再给我那个错误了。这是我所做的:
- 在 windows 桌面上右键单击 "This PC" / "My Computer"
- Select "Properties"
- 转到 "Advanced" 选项卡
- 点击底部的"Environment Variables..."
- 在系统变量下单击 "New..."
- 将"Variable name"设置为"VBOX_INSTALL_PATH"
- 将"Variable value"设置为"C:\Program Files\Oracle\VirtualBox\"
- Select "OK" 并关闭所有其他设置 windows
我遇到了同样的问题,之前的答案对我不起作用。 我打开 VirtualBox GUI,看到虚拟机是 运行。我停止了它,然后执行了“vagrant up”。一切正常。
尝试按照以下步骤操作 1. 运行 以管理员身份执行命令 2.流浪停止 3. 流浪起来 4. 如果需要 vagrant provision 但一旦 vagrant 启动。
- 首先用vagrant destroy破坏虚拟盒子。
- 导航到
C:\Users\Justice
用用户名替换正义。 - 删除
.vagrant.d
文件夹。 - 进入
VirtualBox
VMs 文件夹并删除其中的所有内容。 - 用 vagrant up 重新开始。
它应该可以正常工作。
对于 Mac OS,关闭所有 运行 虚拟机并使用以下命令重新启动虚拟框:
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
禁用在 Windows 中启用的 Hyper-V 虚拟化。
以管理员身份打开命令提示符并运行以下命令:
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
之后,重新启动 PC 并再次尝试 VirtualBox。
Windows更新后,我也遇到了这个问题,我认为是VirtualBox的问题。我的解决方案是重新安装 VirtualBox。
还要确保 VirtualBox 目录路径 C:\Program Files\Oracle\VirtualBox\
在 PATH
环境变量中。
对我来说,重启机器就解决了问题。我刚刚安装了 VirtualBox,可能路径设置不正确。
我遇到了同样的问题,我只需要在计算机的 BIOS 中启用 硬件虚拟化 ,如 Laravel documentation.
中所述If you are using Windows, you may need to enable hardware virtualization (VT-x). It can usually be enabled via your BIOS. If you are using Hyper-V on a UEFI system you may additionally need to disable Hyper-V in order to access VT-x.
只需在安全和隐私中启用 VirtualBox 的权限
提供我在这个问题上的经验可能为时已晚。您可能必须重新启动计算机并在安装 virtualbox 后确保环境变量的值为“C:\Program Files\Oracle\VirtualBox” System Variable Entry
并且系统变量中的路径条目应该有 %VBOX_MSI_INSTALL_PATH% %VBOX_MSI_INSTALL_PATH%
仅限 MACOS 用户 -> 我遇到了同样的问题 只需在 Oracle 的安全和隐私中启用 VirtualBox 的权限即可。
- 以管理员身份打开 PowerShell 或 cmd
- 写
bcdedit /set hypervisorlaunchtype off
- 重启
我的错误:
Stderr: VBoxManage.exe: error: Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter' (VERR_INTNET_FLT_IF_NOT_FOUND).
VBoxManage.exe: error: Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole
我首先尝试禁用“VirtualBox Host-Only”适配器。没用。然后尝试将 virtualbox 从 6.1.28 降级到 6.1.26,但没有用。删除所有内容并从 6.1.26 重新开始,仍然没有用。兜兜转转一段时间后,我意识到还有另一个我没有禁用的适配器,名为“Ethernet 5”,带有“VirtualBox Host-Only ...”描述。不确定它是否是我第一次创建的 运行 virtualbox 6.1.28,但在我禁用它之后,它起作用了。注意到在那之后创建了另一个(“Ethernet 6”),所以很确定第一个问题与 6.1.28 的其他问题相同,然后错误发生了变化到我上面发布的内容。
在“控制面板”>“网络和 Internet”>“网络连接”下禁用所有 VirtualBox Host-Only 以太网适配器#*。
如果您的可用磁盘空间不足 space,您可能会遇到此错误。