Every time we upgrade MacOS, we get broken kernel libraries for VirtualBox and a complete mess with Vagrant. Mac is shifting from kernel modules to a new system, and many developers have to run through it. In this post, I would like to solve the errors I faced during the Monterey update. So, I title it Homestead Vagrant Virtualbox Monterey not Start.
When starting our newlywed system, our kernel modules are lost. At First, I tried uninstalling and reinstalling VirtualBox, but no luck. I prefer this way because it will give you not only the latest version but also it will get known by the kernel. This procedure required for me since Big Sur, plus multiple minor upgrades.
By the way, don't forget to load kernel extensions using the following command:
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 installing the VirtualBox Successfully, You cannot boot the Vagrant properly, I swear.
You will get the following error message.
" Stderr: VBoxManage: error: The virtual machine 'homestead' has terminated unexpectedly during startup because of signal 10. "
The Error occurs when VirtualBox cannot start in Headless mode. How to solve it? Currently, Nah. They opened an issue on Vagrant.
One workaround is here: https://www.vagrantup.com/docs/providers/virtualbox/configuration
If you cannot start headless, you can boot with GUI by configuring this code in scripts/Homestead.rb
config.vm.provider "virtualbox" do |vb|
vb.gui = true
After configuring, you start Vagrant and cause network-related errors, refer to kernel module loading on preliminary measures.
Now we are on the main plot, Vagrant is up successfully, and you can access via ssh, but no sites are up. You can't even access via IP Address.
IP(Homestead) uses "192.168.10.10" in my case, but vboxnet0 works only between 192.168.56.1 and 192.168.63.254, so I change my Homestead IP to 192.168.56.10 in Homestead/Homestead.yaml. Problem solved.
I hope this will help your migration to monterey. I hope this thing will solve after a while. During this period, brace to see the display screen of GUI in your dock, even you hide it.
Please support me by sending a cup of coffee or more if you like it :