VBoxManage: error: Failed to create the host-only

2019-01-12 17:42发布

I am running vagrant 1.4 and virtual box 4.3 on fedora 17 machine. When I do "vagrant up", I get this error:

Bringing machine 'default' up with 'virtualbox' provider...                                                                            


[default] Clearing any previously set forwarded ports...                                                                                                                
[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: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: VBoxNetAdpCtl: ioctl failed for /dev/vboxnetctl: Inappropriate ioctl for devic
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 66 of file VBoxManageHostonly.cpp

22条回答
成全新的幸福
2楼-- · 2019-01-12 17:58

Got the error in Mac after the update to Mojave. Probably you have an older version of virtual box.

Update to a recent version of virtualbox. (5.2 at the time of wrting this post)

Edit: adding @lsimonetti's comment.

In addition to that upgrade to Virtualbox 5.2, you need Vagrant >= 2.0.1

查看更多
放荡不羁爱自由
3楼-- · 2019-01-12 17:58

I'm running Oracle VM Virtualbox on Ubuntu 16.04 LTS.

The solution that worked was to reinstall virtualbox as mentioned here:

sudo apt remove virtualbox virtualbox-5.0 virtualbox-4.*

sudo apt-get install virtualbox

I couldn't find my VirtualBox installation folder, as such could not issue the command:

$sudo /Library/StartupItems/VirtualBox/VirtualBox restart

查看更多
你好瞎i
4楼-- · 2019-01-12 17:58

Windows 10 Pro VirtualBox 5.2.12

In my case I had to edit the Host Only Ethernet Adapter in the VirtualBox GUI. Click Global Tools -> Host Network Manager -> Select the ethernet adapter, then click Properties. Mine was set to configure automatically, and the IP address it was trying to use was different than what I was trying to use with drupal-vm and vagrant. I just had to change that to manual and correct the IP address. I hope this helps someone else.

查看更多
戒情不戒烟
5楼-- · 2019-01-12 18:00

I ran into an issue with totophe's answer running on 10.13.4. MacOS by default can block kexts from loading. You must click the "allow" button before executing the VirtualBoxStartup.sh script.

Solution: Go to System Preferences > Security & Privacy Then hit the "Allow" button to let Oracle (VirtualBox) load.

Then run: sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart like the answer above.

Hope this helps.

(This article provides more clarity to MacOS kernel extension loading)

TL;DR MacOS is probably blocking VirtualBox. Go to System Preferences > Security & Privacy Then hit the "Allow".

查看更多
做个烂人
6楼-- · 2019-01-12 18:00

I'm running Debian 8 (Jessie), Vagrant 1.6.5 and Virtual Box 4.3.x with the same problem.

For me it got fixed executing:

sudo /etc/init.d/vboxdrv setup
查看更多
Rolldiameter
7楼-- · 2019-01-12 18:01

For Mac OS X 10.9.3 and Vagrant 1.6.3 and VirtualBox 4.3.6 this problem was fixed with restarting the VirtualBox

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
查看更多
登录 后发表回答