Homestead Vagrant Virtualbox Monterey not Start

Submitted by lwinmaungmaung on
VirtualBox Monterey - Image from Apple

VirtualBox Monterey Issue

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.

Preliminary Measures

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.

Simple steps:

  1. Uninstall Virtual Box using Uninstall tool
  2. Download the latest version from https://www.virtualbox.org/wiki/Downloads and choose OS X hosts.
  3. You will be notified to allow App Developer in Security & Privacy, Check Security & Privacy and click Allow. Will require your password.
  4. If failed, reinstall again.

 

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. "

Source: https://forums.virtualbox.org/viewtopic.php?f=8&t=104249

 

The Error occurs when VirtualBox cannot start in Headless mode. How to solve it? Currently, Nah. They opened an issue on Vagrant. 

source: https://github.com/hashicorp/vagrant/issues/12557

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

...

end

 

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.

 

source: https://stackoverflow.com/questions/69728426/im-getting-an-error-message-while-running-vagrant-up

 

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 : 

https://www.buymeacoffee.com/lwinmaungmaung