The Problem
In my case I upgraded to Ventura and got the following error when running vagrant up.
Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Checking if box 'laravel/homestead' version '11.3.0' is up to date...
==> homestead: 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 HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
The Solution
Here’s what I did (results may vary):
- Uninstall Virtual Box.
- I did this by opening a Virtual Box installer file, a .dmg file, and control clicking on the ‘VirtualBox_Uninstall.tool’. I had to use command click to bypass an ‘unidentified developer’ error I was getting when simply double clicking.
- This opens a terminal and asks for confirmation. You type ‘Yes’. For me it asked if I want to delete other extensions related to Virtual Box. I went with ‘Yes’
- Restart Computer
- Download the latest Virtual Box I can find. In my case the downloaded installer was VirtualBox-7.0.4-154605-OSX.dmg
- After this I tried to run
homestead up
but got an error that my Vagrant version was now not in sync. - Next I installed the latest Vagrant with the following
brew install hashicorp/tap/hashicorp-vagrant
- Finally I ran homestead up and everything worked. My project booted up as normal.