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:
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 ?
What helped eventually was allowing oracle through the terminal in recoverymode
spctl kext-consent add VB5E2TV963
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
sudo hdiutil attach VirtualBox-6.1.28-147628-OSX.dmg
cd /Volumes/VirtualBox
sudo installer -package VirtualBox.pkg -target /