执行`VBoxManage`时出错,这是Vagrant用来控制VirtualBox的CLI.窗户10

ren*_*ell 20 virtualbox vagrant laravel-5 windows-10 homestead

我昨天刚使用powershell运行laravel宅基地.现在,它甚至都不会运行.我刚刚暂停了流浪汉并关闭了我的电脑.现在它只是给我这个错误:

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
Run Code Online (Sandbox Code Playgroud)

小智 21

我有同样的问题,之前的答案对我不起作用.我打开VirtualBox GUI,看到虚拟机正在运行.我停了下来,然后我执行了" 流浪汉 ".一切顺利.


ren*_*ell 14

好的,所以我终于解决了这个问题.试图重新启动我的笔记本电脑,它不再给我这个错误了.这是我做的:

  1. 在Windows桌面上右键单击"此PC"/"我的电脑"
  2. 选择"属性"
  3. 转到"高级"选项卡
  4. 单击底部的"环境变量..."
  5. 在系统变量下单击"新建..."
  6. 将"变量名称"设置为"VBOX_INSTALL_PATH"
  7. 将"变量值"设置为"C:\ Program Files\Oracle\VirtualBox \"
  8. 选择"确定"并关闭所有其他设置窗口

来源:https://github.com/mitchellh/vagrant/issues/3852


Kay*_*ayV 10

对于 Mac OS,关闭所有正在运行的虚拟机并使用以下命令重新启动虚拟机:

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
Run Code Online (Sandbox Code Playgroud)


Bra*_*art 6

在此处输入图片说明

只需在安全和隐私中启用 VirtualBox 的权限


小智 5

  1. 首先用 vagrant destroy 销毁虚拟盒子。
  2. 导航以C:\Users\Justice通过用户名替换正义。
  3. 删除.vagrant.d文件夹。
  4. 进入VirtualBoxVMs 文件夹并删除其中的所有内容。
  5. 使用 vagrant up 重新启动它。

它应该工作正常。

  • 啊?一个答案涉及修改路径,另一个答案涉及重新启动 vagrant,而您建议删除大量文件只是为了“它应该可以正常工作”?这看起来不是一个好的答案...... (4认同)