Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 ?

like image 392
Maartje Avatar asked Sep 05 '25 14:09

Maartje


1 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

like image 160
Miguel Cardoso Avatar answered Sep 09 '25 03:09

Miguel Cardoso