Failed to create the host-only adapte

时间:2024-02-21 15:42:11

vagrant up启动时如果设置成private_network报如下错:

Bringing machine \'default\' up with \'virtualbox\' provider...
[default] Importing base box \'precise64\'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: E_INVALIDARG
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Assertion failed: [!aGuid.isValid()] at \'D:\tinderbox\win-4.3\src\VBox\Main\src-server\HostNetworkInterfaceImpl.cpp\' (74) in long __cdecl HostNetworkInterface::init(class com::Bstr,class com::Bstr, class com::Guid,enum __MIDL___MIDL_itf_VirtualBox_0000_0000_0034).
VBoxManage.exe: error: Please contact the product vendor!
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface
VBoxManage.exe: error: Context: "int __cdecl handleCreate(struct HandlerArg *,int,int *)" at line 66 of file VBoxManageHostonly.cpp

原因是virtualbox4.3.26版本有bug,无法创建host-only网卡

解决办法:下载4.3.24版本安装(安装会覆盖掉之前的版本,但不影响之前配置的虚拟机)

参考:http://www.tuicool.com/articles/q2YrMzn

https://github.com/puphpet/puphpet/issues/272