Vagrant Error in OSX: There was an error while executing `VBoxManage`, a CLI used by Vagrant for Controlling VirtualBox

I got the following error earlier in OSX when launching my powered off VVV instance with `vagrant up`:

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: failed to open /dev/vboxnetctl: No such file or directory
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

I was able to fix this by running the following:

cd /Library/Application\ Support/VirtualBox/LaunchDaemons/
sudo ./VirtualBoxStartup.sh restart

This reset the services used by Virtualbox and allowed Vagrant to talk correctly to the virtual interfaces again. My guess is that this would help solve related errors as well, not just the one that I received.

3 Replies to “Vagrant Error in OSX: There was an error while executing `VBoxManage`, a CLI used by Vagrant for Controlling VirtualBox”

Leave a Reply