6

I just upgraded my Intel-based MacBook Air (Retina, 13-inch, 2020) to macOS Monterey (12.0.1) — previously was using macOS Big Sur (11.6.1) — and while everything seems fine, I am getting this odd error when attempting to run vagrant up:

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "ddf33f97-bcf8-49d7-8d48-6368962d504a", "--type", "headless"]

Stderr: VBoxManage: error: The virtual machine 'Sandbox (CentOS 7)' has terminated unexpectedly during startup because of signal 10
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

I am using Vagrant 2.2.18 and VirtualBox 6.1.28 and I tried everything I have done in the past for cases like this to no avail.

  • Uninstalling Vagrant and reinstalling it again.
  • Uninstalling VirtualBox and reinstalling it again.
  • Made sure to reboot my MacBook Air to get the kernel extensions loaded again.
  • Uninstalling VirtualBox 6.1.28 and downgrading to VirtualBox 6.1.26.

But no matter what I do, the same error pops up.

What can be done to resolve this issue?

1
  • 1
    Same here. I upgraded as well to macOS Monterey. And having the same exact issue in my VirtualBox. I can no longer use the headless start, Instead, I used the normal start with GUI which is a bit annoying. Commented Oct 27, 2021 at 12:11

4 Answers 4

5

Expanding on @Giacomo1968's answer, which got me very close. (Thank you!)

This specific comment really helped me. https://github.com/hashicorp/vagrant/issues/12557#issuecomment-954704523

Here are the steps I took to fix:

  1. Add the following to Vagrantfile in the config.vm.provider section

    v.gui = true
    
  2. Create a file as sudo: /etc/vbox/networks.conf

  3. Paste the following in the networks.conf: * 0.0.0.0/0 ::/0

  4. Then run this:

    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
    

Then vagrant up!

1
  • Can confirm that works for me. Thanks a lot! Monterey 12.0.1
    – r00t
    Commented Nov 4, 2021 at 13:27
4

This is a known issue and seems to be related to VirtualBox version 6.1.28.

The issue has been solved with the release of VirtualBox version 6.1.30.

There is a healthy and detailed thread in the official HashiCorp repo for Vagrant about this: “Vagrant up issues in Mac OS Monterey #12557

The issue seems 100% unrelated to VirtualBox 6.1.28 or even the earlier 6.1.26 since people report the same overall behavior.

Note the specific error you have posted:

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "047f549a-e0be-48d9-93d5-6b1958594689", "--type", "headless"]

The command that is failing is the default headless option for staring VMs via Vagrant. And the only work-around for now is to set the startup option to gui instead of headless.

As explained in the official Vagrant docs:

GUI vs. Headless

By default, VirtualBox machines are started in headless mode, meaning there is no UI for the machines visible on the host machine. Sometimes, you want to have a UI. Common use cases include wanting to see a browser that may be running in the machine, or debugging a strange boot issue. You can easily tell the VirtualBox provider to boot with a GUI:

config.vm.provider "virtualbox" do |v|
  v.gui = true
end

So just find the config.vm.provider "virtualbox" do block in your Vagrantfile and set that v.gui = true and it should work now; albeit with a GUI popping up which might be a wee bit annoying.

That said, another user in that issue thread states that config.vm.network networking commands might not work.

So this all might boil down to this being fixed in Vagrant 2.2.19? Or maybe VirtualBox is misbehaving as well?

Confusing and annoying, but hopefully this helps in some way.


UPDATE: It seems to be an issue in VirtualBox itself, and not Vagrant. The issue seems to be addressed in ticket number 20636 titled, “VBoxHeadless does not run in macOS Monterey 12.0.1 => fixed in SVN/next maintenance.” And according to a comment by the user “klaus”:

The latest 6.1 test build has the fix, but the usual "not notarized" caveat applies which is documented there, with the "disable SIP" workaround.


UPDATE: Fixed in VirtualBox version 6.1.30; the version 6.1 changelog explicitly references ticket number 20636:

VBoxHeadless: Fixed crash when running on macOS Monterey (bug #20636)

1

This is a know issue with VirtualBox. They are currently working on it. It is not a Vagrant issue.

You can test this by going to VirtualBox and running the machine which works fine unless you try headless or detached state.

0
0

https://www.virtualbox.org/ticket/20637

Changed 11 hours ago by klaus The latest 6.1 test build has the fix, but the usual "not notarized" caveat applies which is documented there, with the "disable SIP" workaround.

Oh, and before I forget: the "issue" with vboxnet not getting addresses and so on is unrelated to this ticket. See #20626 for pointers to the relevant information.

1
  • I have upgraded the virtual box to the latest test build , now it works ok
    – Alex Zhou
    Commented Oct 30, 2021 at 9:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .