vagrant up 启动失败, Failed to instantiate CLSID_VirtualBox w/ IVirtualBox, but CLSID_VirtualBox w/ IUnknown works.
解决办法:
出现vagrantBox无法打开情况,先执行以下步骤,
- win+r 快捷键打开 “运行”,输入regedit 打开注册表
- 找到 HKEY_CLASSES_ROOT\CLSID{00020420-0000-0000-C000-000000000046}
InprocServer32 修改 第一行(默认)的值为 C:\Windows\system32\oleaut32.dll - 3,找到HKEY_CLASSES_ROOT\CLSID{00020424-0000-0000-C000-000000000046}
InprocServer32 修改 第一行(默认)的值为 C:\Windows\system32\oleaut32.dll - 完事。(我修改了完了 也没试用,直接重启电脑 然后成功了)
另外一种情况:There was an error while executing VBoxManage
, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.
之后再执行:
1、在C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.8.6\plugins\providers\virtualbox目录下打开action.rb,注释掉第74行:b.use ClearNetworkInterfaces(因个人安装位置不同可能有所差异)
2、以管理员权限打开VirtualBox,去管理->全局设定->网络界面,点击第二个选项卡“仅主机(Host-only)网络”,选择一个适配器进行编辑(将IP设为与Vagrantfile中一致即192.168.10.10)并保存:
设置VirtualBox全局网络配置
3、再次运行vagrant reload便可启动成功