macOS Monterey failing to start vagrant box?

I have a Vagrant box with Virtual Box setup.

I just updated my macOS version Monterey (12.0.1) and I am getting following error when I try to vagrant up my box.

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 HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp

Also, I tried to run this command VBoxManage hostonlyif create which is giving below output:

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 HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp

I tried following:

  1. Given all required permissions from Security preferences and also allowed full disk access to VirtualBox and Terminal apps.
  2. Also tried upgrading to latest vagrant and virtual box.
  3. Re-installed both vagrant and virtualbox

But none of the above worked yet, anyone please help!

0

2 Answers

Re-install whatever version of VirtualBox you are using to get the host-only adapter in place again.

The other answers here are focusing on other issue — where VirtualBox is failing to start in headless mode as described in this other question — but your error is clearly different and something I ran into myself. Note this error you are getting:

VBoxManage: error: Failed to create the host-only adapter

I had this error as well. And the only way I solved it is to reboot my MacBook, and then reinstall VirtualBox again.

I believe this happens when one updates VirtualBox, and then that “System Preferences” prompt comes up. I believe it stops the process of installing the host-only adapter so you basically have to reboot and reinstall VirtualBox again.

To confirm the host-only adapter is indeed in place, launch the VirtualBox GUI application and then click on “Tools” which is the top menu item on the left; you should see a vboxnet0 adapter as shown in the screenshot below.

That vboxnet0 is the host-only adapter. And if it is there, you should be able to do a vagrant up and your machine should start. But then again — as said at the outset — there is another issue with Vagrant and VirtualBox that is addressed in that other SuperUser thread.

VirtualBox “Tools” screenshot.

Temporary workaround is here ->

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like