Cant run virtualbox after updating mac to 12.0.1 monterey - error with host only adapter

Viewed 3333

I'm running a virtualbox image using vagrant on mac. Everything worked fine untill I updated to the latest Mac version (12.0.1 Monterey).

When I try to start up the machine using vagrant up I get the following error:

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

If I go into virtualbox (the mac app) and start the machine there I also get an error (just saying it failed to start the machine. If I go to the host network manager part of

So there seems to be a problem with the host-only adapter.

After some diving into it and looking through other people's problems and solutions I tried the following:

  1. Allowing oracle from security and privacy settings, this didn't appear however
  2. running a command that restarts virtualbox (can't find what it was anymore, sorry :/ )
  3. reinstalling virtualbox
  4. install a testbuild from virtualbox(6.1)
  5. Adding virtualbox to full disk permissions
  6. adding the following from the vagrant documentation code in the vagrantfile:
    config.vm.provider "virtualbox" do |v|
      v.gui = true
    end

Everytime I try to install virtualbox I get an error stating that the setup failed. But the icon is back again.

What can this be and how can I solve this ?

3 Answers

Restart your PC and run these commands:

sudo kextload -b org.virtualbox.kext.VBoxDrv
sudo kextload -b org.virtualbox.kext.VBoxNetFlt
sudo kextload -b org.virtualbox.kext.VBoxNetAdp
sudo kextload -b org.virtualbox.kext.VBoxUSB

After that, try vagrant up again

This worked for me and allowed me to bypass that error

What helped eventually was allowing oracle through the terminal in recoverymode

  1. start up mac
  2. hold command and r at the same time untill you see the apple logo
  3. Go to utilities
  4. spctl kext-consent add VB5E2TV963
  5. restart

There is a full document on it here: https://appuals.com/kernal-driver-not-installed-rc-1908-error-mac/

But now everytime I want to restart vagrant i need to do the folliwing in the terminal. My vagrant installfile(6.1.28) is located in my homefolder, if it is diffrent for you, change the locations in the commands as well

  1. sudo hdiutil attach VirtualBox-6.1.28-147628-OSX.dmg
  2. cd /Volumes/VirtualBox
  3. sudo installer -package VirtualBox.pkg -target /

you will find tons of answer and may be some could work for you. After trying a few and understanding the the current saved state is what is causing the problem I did these simple steps and started working without restarting VM or the Mac.

See image 1, follow my path if yours is the same and delete .vbox-prev file

See Image 2, With the VM Manager open, right-click in the machine you've created, chad choose Delete Saved State...

Then Bingo, start your machine normally.

It takes 15 seconds to try.

[delete .vbox-prev][1]

Related