I am running macOS Monterey 12.0.1 with Vagrant 2.2.19 and VirtualBox 6.1.30. When I attempt to start up Vagrant via the mac terminal using vagrant up
this error message is returned:
Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Checking if box 'laravel/homestead' version '11.5.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
I have tried uninstalling and reinstalling both VirtualBox and Vagrant along with reboots of macOS but I'm still getting the same above message.
In my search for an answer I keep coming across a suggestion to add this to my Vagrantfile but I'm unsure where it needs to be inserted since it does not currently have it in my file and no one ever states where in the file to insert it:
config.vm.provider "virtualbox" do |v| v.gui = true end
Also, within the codebase for Vagrant, I found this snippet indicating it might be a kernel driver needing to be installed or properly installed. But I'm not finding any references on driver installation.
if r.stderr =~ /failed to open \/dev\/vboxnetctl/i
# This catches an error message that only shows when kernel
# drivers aren't properly installed.
@logger.error("Error message about unable to open vboxnetctl")
raise Vagrant::Errors::VirtualBoxKernelModuleNotLoaded
end
Any guidance on how I might make changes to my configuration to Vagrant or VirtualBox to get vagrant up and passed the error messages would be appreciated.