由于虚拟机错误(MS 81),无法运行vagrant up。

4
我使用的是Windows 8.1操作系统,当我试图安装vagrant并使用virtual box时,总是会出现以下错误提示:
"The provider 'virtualbox' that was requested to back the machine 'default' is reporting that it isn't usable on this system. The reason is shown below:
Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed. Vagrant uses the VBoxManage binary that ships with VirtualBox, and requires this to be available on the PATH. If VirtualBox is installed, please find the VBoxManage binary and add it to the PATH environmental variable."
我已经尝试过卸载virtual box和vagrant并重新安装它们,也尝试了先安装vagrant再安装vbox,以及反过来安装,但结果都没有改变。
由于我对vagrant还不熟悉,希望有人能够提供帮助。
5个回答

4
如Emyl所说,您可以降级VirtualBox或将Vagrant升级到1.6.3(因为在此版本中已修复此问题)。
但是,如果您想快速解决此问题,只需将Virtual Box安装路径的环境变量名称从“VBOX_MSI_INSTALL_PATH”更改为“VBOX_INSTALL_PATH”。
(此PC->高级系统设置->环境变量->搜索“VBOX_MSI_INSTALL_PATH”,并将其更改为“VBOX_INSTALL_PATH”)
确保在再次执行“vagrant up”之前重新启动终端。
你完成了!

更改环境变量不会影响VirtualBox的正常运行吗?我认为您应该创建VBOX_INSTALL_PATH作为一个新的环境变量,指向VBOX_MSI_INSTALL_PATH,如此处所述:https://github.com/mitchellh/vagrant/issues/3852 - Yep_It's_Me
变量更改选项在我使用基本安装的Windows 8.1上运行良好。当然需要重新启动。 - Rickerd

4

我打赌你正在使用最新的VirtualBox版本(4.3.12)。如果是这样,那么有一个已知的问题将在Vagrant 1.6.3中得到解决:

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

作为解决方法,您可以安装VirtualBox 4.3.10版本,这样它就能完美地运行。


更改Windows变量是更好的选择。可以使用此方法安装最新版本的Vagrant。 - Rickerd

3
将环境变量中的VBOX_MSI_INSTALL_PATH更改为VBOX_INSTALL_PATH并重新启动终端解决了我的问题 :)

不要忘记在完成此操作后重新启动计算机,否则它将无法运行。 - Sorin

1
我必须以管理员身份运行cmd.exe,才能在使用Sri Harsha Kappala的解决方案后使其正常工作。

1

我也曾在Windows 8.1上遇到过这个问题,通过重新启动电脑解决了它。如果你刚刚安装了VirtualBox,当你运行“vagrant up”时,你可能需要重启命令提示符或Windows以便环境变量能够被正确读取。


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