VirtualBox - Failed to create the host-only adapter [OSX]
This morning I went to fire up my local vagrant machine on OSX and I got the following error:
Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'laravel/homestead' is up to date... ==> 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: 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
The solution for me was to remove VirtualBox, download a newer version from https://www.virtualbox.org/wiki/Downloads and reinstall it. After that vagrant up was working again.
In case it does not work try to update or reinstall vagrant too, but the main culprit was VirtualBox as it was not able to create any host adapters.