Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS Monterey and VirtualBox 6.1.28 #12557

Closed
petealves opened this issue Oct 26, 2021 · 72 comments
Closed

macOS Monterey and VirtualBox 6.1.28 #12557

petealves opened this issue Oct 26, 2021 · 72 comments

Comments

@petealves
Copy link

Hello. I am having some issues with running vagrant up in Mac OS Monterey 12.0.1.
I am running Virtual Box version 6.1.26 (I have tried 6.1.28, same problems) and Vagrant version 2.2.18.
During the installation of VBox I did went into System Preferences -> Privacy -> Allow Oracle....

So, the first problem is the following:
image
However, when I load the kexts (found this suggestion in other threads) by running 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 it throws me another error which I could not find any solution for.
image

Is this some problem with MacOS Monterey? Thanks!

@mmihalev
Copy link

Absolutely the same issue here too.
I've also reported it to Oracle here: https://www.virtualbox.org/ticket/20636#comment:2

@tomektomczuk
Copy link

tomektomczuk commented Oct 26, 2021

Same problem here after upgrading to Monterey

vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-20.04' version '202107.28.0' is up to date...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "ccae549f-744e-40e2-8a06-0f6a1f7aeced", "--type", "headless"]

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

@ovunckesici
Copy link

ovunckesici commented Oct 26, 2021

Same problem here.

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

Command: ["startvm", "72222bee-d25d-4809-baa0-4e7749931097", "--type", "headless"]

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

@Vextil
Copy link

Vextil commented Oct 26, 2021

Same issue with Monterey.

Bringing machine 'pay' up with 'virtualbox' provider...
==> pay: Importing base box 'bento/ubuntu-20.04'...
==> pay: Matching MAC address for NAT networking...
==> pay: Checking if box 'bento/ubuntu-20.04' version '202107.28.0' is up to date...
==> pay: Setting the name of the VM: pay
==> pay: 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

@dsutphin
Copy link

A workaround I've found is to enable the VirtualBox GUI in the Vagrantfile.
https://www.vagrantup.com/docs/providers/virtualbox/configuration#gui-vs-headless

@petealves
Copy link
Author

A workaround I've found is to enable the VirtualBox GUI in the Vagrantfile. https://www.vagrantup.com/docs/providers/virtualbox/configuration#gui-vs-headless

Can confirm, it worked as a workaround for me. Thanks!!

@mmihalev
Copy link

A workaround I've found is to enable the VirtualBox GUI in the Vagrantfile. https://www.vagrantup.com/docs/providers/virtualbox/configuration#gui-vs-headless

I can confirm that workaround worked with me as well. However, the IP address on the VM was not set to the one from the Vagrantfile / config.vm.network 'private_network', ip: '11.0.0.12' /.
Not sure if this is because of the workaround, or because of some other issue related to vagrant/virtualbox.

@tomektomczuk
Copy link

For me it stuck at

`==> default: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3,udp 192.168.50.1:/System/Volumes/Data/Users/[localtion]/vagrant-nfs-marcin.test

Stdout from the command:

Stderr from the command:

mount.nfs: Connection timed out
exit status 1`

@dsutphin
Copy link

However, the IP address on the VM was not set to the one from the Vagrantfile / config.vm.network 'private_network', ip: '11.0.0.12' /.

I ran into this as well. Using config.vm.network "forwarded_port", guest: 80, host: 8080 for now. Keeping an eye out for better solutions.

@mmihalev
Copy link

For me it stuck at

`==> default: Mounting NFS shared folders... The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!

mount -o vers=3,udp 192.168.50.1:/System/Volumes/Data/Users/[localtion]/vagrant-nfs-marcin.test

Stdout from the command:

Stderr from the command:

mount.nfs: Connection timed out exit status 1`

It stuck probably due to the same reason with the incorrect IP address set to the VM. It seems that with the workaround it's not setting the correct IP address.

@rockblings
Copy link

For me, it is still showing this error

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

@rockblings
Copy link

after enabling the VirtualBox Gui, then ran these commands: 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 it worked for me.

@tomektomczuk
Copy link

tomektomczuk commented Oct 26, 2021

For me @rockblings solution haven't bring a temporary solution. Still stuck on Mounting NFS shared folders

Running command => vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-20.04' version '202107.28.0' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
[default] GuestAdditions seems to be installed (6.1.28) correctly, but not running.
update-initramfs: Generating /boot/initrd.img-5.4.0-80-generic
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules. This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup
VirtualBox Guest Additions: or
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 5.4.0-80-generic.
update-initramfs: Generating /boot/initrd.img-5.4.0-80-generic
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
Restarting VM to apply changes...
==> default: Attempting graceful shutdown of VM...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
==> default: Mounting NFS shared folders...

@semul
Copy link

semul commented Oct 26, 2021

Hello. I am having some issues with running vagrant up in Mac OS Monterey 12.0.1. I am running Virtual Box version 6.1.26 (I have tried 6.1.28, same problems) and Vagrant version 2.2.18. During the installation of VBox I did went into System Preferences -> Privacy -> Allow Oracle....

So, the first problem is the following: image However, when I load the kexts (found this suggestion in other threads) by running 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 it throws me another error which I could not find any solution for. image

Is this some problem with MacOS Monterey? Thanks!

I am having same issue :(

@mmihalev
Copy link

I think it may be related with Virtualbox running in headless mode. It looks like this issue here: https://www.virtualbox.org/ticket/20636

@seak6adtn59v
Copy link

seak6adtn59v commented Oct 26, 2021

I tried combination of @dsutphin and @rockblings solutions and it worked a bit but not fully.

I am using:
Vagrant 2.2.18
VirtualBox 6.1.28

I did this:

  1. Changed "gui" instead "headless" in Vagrantfile.

  2. Run following commands in Terminal immediately you switch on Mac.

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;
  1. After that run vagrant up and it boots well.

But I have following config in my Vagrantfile

config.vm.network "private_network", ip: "192.168.68.35"

And these are not working, so vagrant up but it is not able to forward ip properly and hence I cannot access it via local domains pointed to that ip in hosts file.

Please help if anyone knows about how to fix this IP thing now.

@mmihalev
Copy link

Same complains in the Virtalbox's forum as well https://forums.virtualbox.org/viewtopic.php?f=8&t=104249&p=507889

@rockblings
Copy link

Forgot to mention that the solution that works for me did not work with VirtualBox 6.1.28. so i downgraded to 6.1.26. then it worked after uninstalling and installing the 6.1.26. i hope this helps

@mathsalmi
Copy link

Forgot to mention that the solution that works for me did not work with VirtualBox 6.1.28. so i downgraded to 6.1.26. then it worked after uninstalling and installing the 6.1.26. i hope this helps

This seems to work for me too. Thank you!

@chrispelzer
Copy link

We noticed this issue when we upgraded to Virtualbox 6.1.28 on BigSur 11.6 the other day, downgrading to Virtualbox 6.1.26 fixed the issue and allowed the box to boot up.

@maxpdx
Copy link

maxpdx commented Oct 27, 2021

I can confirm that adding .gui = true to Vagrantfile fixed my issue.
vagrant 2.2.18
VirtualBox 6.1.26 (had to downgrade from 6.1.28 to fix the config.vm.network "private_network", ip: "xxx.xxx.xxx.xxx" config not loading)
DID NOT HAVE TO RUN sudo kextload ... commands. Hope this helps as I had to spend A LOT of time on this issue.

@maxpdx
Copy link

maxpdx commented Oct 27, 2021

We noticed this issue when we upgraded to Virtualbox 6.1.28 on BigSur 11.6 the other day, downgrading to Virtualbox 6.1.26 fixed the issue and allowed the box to boot up.

Did NOT work for me without .gui = true in my vagrantfile.

@tomektomczuk
Copy link

I can also confirm that downgrading to 6.1.26 and adding

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

to the project Vagrantfile allowed me to run the project

@rariteth
Copy link

rariteth commented Oct 27, 2021

Worked for me just adding:

Homestead.yaml

ip: "192.168.10.10"
memory: 6144
cpus: 4
provider: virtualbox
gui: 1 <----- this
...

vagrant 2.2.18
VirtualBox 6.1.28

@mmihalev
Copy link

Worked for me just adding:

Homestead.yaml

ip: "192.168.10.10" memory: 6144 cpus: 4 provider: virtualbox gui: 1 <----- this ...

vagrant 2.2.18 VirtualBox 6.1.26

And IP address was correctly set to 192.168.10.10 ?
Because with VirtualBox 6.1.28, IP address set in the Vagrantfile is not respected.

@rariteth
Copy link

rariteth commented Oct 27, 2021

Worked for me just adding:
Homestead.yaml
ip: "192.168.10.10" memory: 6144 cpus: 4 provider: virtualbox gui: 1 <----- this ...
vagrant 2.2.18 VirtualBox 6.1.26

And IP address was correctly set to 192.168.10.10 ? Because with VirtualBox 6.1.28, IP address set in the Vagrantfile is not respected.

yes, I uninstall 6.1.26 and install 6.1.28, do vagrant destroy and vagrant up worked good with small screen

https://www.virtualbox.org/ticket/20636
Will be fixed in the next maintenance release.

короче все работает на последней версии VB, перестанавливал обе версии 6.1.26 и 6.1.28, появляется маленький экран вертуалки - сворачиваешь его и все

@mmihalev
Copy link

I can confirm that VirtualBox 6.1.26 respects the IP address configured into the Vagrantfile. Version 6.1.28 - did NOT!
Not sure if thats Vagrant or Virtualbox issue tho.

@mmihalev
Copy link

According to this ticket: https://www.virtualbox.org/ticket/20626 there is some change about host-only networking on the newest 6.1.28 VirtualBox. Probably thats why IP addresses set from the Vagrantfile are not respected?

@andresmauro17
Copy link

Same issue Here

image

@andresmauro17
Copy link

Worked for me just adding:

Homestead.yaml

ip: "192.168.10.10" memory: 6144 cpus: 4 provider: virtualbox gui: 1 <----- this ...

vagrant 2.2.18 VirtualBox 6.1.28

Work for me!

@sonykey2003
Copy link

I tried combination of @dsutphin and @rockblings solutions and it worked a bit but not fully.

I am using: Vagrant 2.2.18 VirtualBox 6.1.28

I did this:

  1. Changed "gui" instead "headless" in Vagrantfile.
  2. Run following commands in Terminal immediately you switch on Mac.
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;
  1. After that run vagrant up and it boots well.

But I have following config in my Vagrantfile

config.vm.network "private_network", ip: "192.168.68.35"

And these are not working, so vagrant up but it is not able to forward ip properly and hence I cannot access it via local domains pointed to that ip in hosts file.

Please help if anyone knows about how to fix this IP thing now.

It works for me without the "private_network" part, thanks!

@justinrclarke
Copy link

What worked for me is combination of all above:

Vagrant 2.2.18 VirtualBox 6.1.28

created /etc/vbox/networks.conf on the host machine with the following content

* 10.0.0.0/8 192.168.10.0/24
* 2001::/64

These commands after every reboot:

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;

and adding gui = true to Vagrantfile

 project_config.vm.provider 'virtualbox' do |vb|
    vb.gui = true  # Add this line
    ...

Thanks everyone and good luck

With a fresh install of Monterey and all of the applications, this finally worked for me.

@ltutar
Copy link

ltutar commented Nov 1, 2021

I want to summarize what helped me based on all the valuable input above.
I am using on MacOS Monterey version 12.0.1:

  • Vagrant version 2.2.18
  • vagrant-vbguest (0.21.0, global)
  • VirtualBox 6.1.26
    and had to change vb.gui = false to vb.gui = true

This combination is working for me.

If I use

  • a higher version of vagrant-vbguest, mount does not work.
  • VirtualBox version 6.1.28, then I Ansible or ssh can not reach my vagrant boxes (unreachable ip address and port). BTW. vagrant ssh keeps working.
  • vb.gui = false, then I get the error VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

@webautosetby
Copy link

I spent a long time solving the issue of virtualbox and switched to docker and this was my best solution, a solution to work with docker and forget about vagrant and virtualbox problems

@iainhouston
Copy link

I too have finally lost patience with VirtualBox with niggles for months and finally total failure with Monterey, and, since I had Parallels Desktop already on my Mac, using geerlingguy/drupal-vm I changed my vagrant.config.yml to specify vagrant_box: bento/ubuntu-18.04; I did vagrant plugin install vagrant-parallels and vagrant up provider=parallels and that was pretty much it.
Every other aspect of the development setup remains unchanged. Wish I’d done this years ago. Genuinely very grateful for free use of VirtualBox for many years but my loyalty finally evaporated this month.

@tomektomczuk
Copy link

tomektomczuk commented Nov 1, 2021

I downgraded to Big Sur and doesn't have any problems with 6.1.26. I use Vagrant and Virtualbox with https://roots.io/docs/trellis/master/installation/#create-a-project - both are required.

@ghost
Copy link

ghost commented Nov 2, 2021

First of all you need to have 6.1.28 on Monterey to prevent kernel panics.

The second issue with not loading the kexts automatically is because the file
/Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh still has Big Sur as its "MACOS_VERS".
You need to change every line that goes from
if [[ ${MACOS_VERS} != 11.* ]]; then
to
if [[ ${MACOS_VERS} != 12.* ]]; then
There should be 3 lines containing "11.*"

Not sure why oracle didn't change this yet.

@dkoether
Copy link

dkoether commented Nov 2, 2021

First of all you need to have 6.1.28 on Monterey to prevent kernel panics.

The second issue with not loading the kexts automatically is because the file /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh still has Big Sur as its "MACOS_VERS". You need to change every line that goes from if [[ ${MACOS_VERS} != 11.* ]]; then to if [[ ${MACOS_VERS} != 12.* ]]; then There should be 3 lines containing "11.*"

Not sure why oracle didn't change this yet.

Unfortunately it still does not work at all. Using 6.1.28 and fixing those lines in VirtualBoxStartup.sh still causes kernel problem while starting the vm. :( Am I missing something or is it currently impossible to use macOS Monterey and Vagrant (with VirtualBox)?

@dt-farzin-faridfar
Copy link

The second issue with not loading the kexts automatically is because the file
/Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh still has Big Sur as its "MACOS_VERS".
You need to change every line that goes from
if [[ ${MACOS_VERS} != 11.* ]]; then
to
if [[ ${MACOS_VERS} != 12.* ]]; then
There should be 3 lines containing "11.*"

This will fix one of the issues. I also restarted VBox:

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart

It seems there's another an ongoing issue with gui and starting the VM headless VBoxHeadless does not run in macOS Monterey 12.0.1. So you have to uncomment this part in Vagrantfile:

  config.vm.provider "virtualbox" do |vb|
    # Display the VirtualBox GUI when booting the machine
    vb.gui = true
  end

Then the vagrant up worked fine for me.
My problem, however, is that I made my life "easier" by adding another layer of difficulty and calling the Vagrant via Ansible molecule. So far, I couldn't find a way to update the gui part in Vagrantfile of a molecule VM!

I'm on MacOS 12.0.1:

$ VBoxManage -v
6.1.28r147628
vagrant -v
Vagrant 2.2.18

@chrisroberts
Copy link
Member

Hi everyone,

To summarize this issue, there are currently issues with VirtualBox on macOS Monterey. There's three different things which are causing issues:

  1. VMs cannot be started headless VB#20636
  2. kexts not being loaded properly VB#20637
  3. Cannot create network within given subnet VB#20626

For 1, the only way to workaround this is to enable the GUI within the provider configuration:

config.vm.provider :virtualbox do |vb|
  vb.gui = true
end

For 2, the kernel extensions can be loaded manually (which may be required after reboot):

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;

For 3, the 6.1.28 release introduced a new restriction when creating networks which can be found here. PR #12564 adds validation to given addresses and returns back useful error message for how to add more ranges to the VirtualBox configuration.

Unfortunately there is nothing we can do directly to resolve these issues (outside of the networking issue which will be included in the next release). The next maintenance release of VirtualBox should include fixes for the other two issues.

Cheers!

@ckihneman
Copy link

What worked for me is combination of all above:

Vagrant 2.2.18 VirtualBox 6.1.28

created /etc/vbox/networks.conf on the host machine with the following content

* 10.0.0.0/8 192.168.10.0/24
* 2001::/64

These commands after every reboot:

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;

and adding gui = true to Vagrantfile

 project_config.vm.provider 'virtualbox' do |vb|
    vb.gui = true  # Add this line
    ...

Thanks everyone and good luck

To hopefully help some others out there, I'm using Trellis from roots.io. I did all of the above steps, but I was hanging while trying to get admin privileges for mounting NFS shared folders. I was typing my password into the prompt, but then the system would still ask privileges from a system modal. I'd do that, then it would still hang (and timeout eventually), right on this part:

==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
==> default: Mounting NFS shared folders...

As another user mentioned:

Forgot to mention that the solution that works for me did not work with VirtualBox 6.1.28. so i downgraded to 6.1.26. then it worked after uninstalling and installing the 6.1.26. i hope this helps

After re-installing VirtualBox to 6.1.26 (and accepting the privacy request from Oracle, then rebooting my system), my Trellis VM works once again.

And yes, you do have to run those commands after restarting your computer (every time).

@songliqiangcn
Copy link

$ vagrant up --provision
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'lc/homestead'...
==> homestead-7: Matching MAC address for NAT networking...
==> homestead-7: Checking if box 'lc/homestead' version '11.0.0' is up to date...
==> homestead-7: Setting the name of the VM: homestead-7
==> homestead-7: 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", "ipconfig", "vboxnet0", "--ip", "192.168.10.1", "--netmask", "255.255.255.0"]

Stderr: VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp

Vagrant : 2.2.18 virtualbox version: 6.1.28 r147628 (Qt5.6.3) macos version: 12.0.1

Tried all of the above and it still doesn't work :(

Same issue

@dkoether
Copy link

dkoether commented Nov 3, 2021

What worked for me is combination of all above:

Vagrant 2.2.18 VirtualBox 6.1.28

created /etc/vbox/networks.conf on the host machine with the following content

* 10.0.0.0/8 192.168.10.0/24
* 2001::/64

These commands after every reboot:

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;

and adding gui = true to Vagrantfile

 project_config.vm.provider 'virtualbox' do |vb|
    vb.gui = true  # Add this line
    ...

Thanks everyone and good luck

This worked for me. VM is running, thank you!

@blade2201
Copy link

blade2201 commented Nov 3, 2021

What i did to make it work was:

  • Downgrade VirtualBox to 6.1.16

Than i had "Kernel driver not installed (rc=-1908)" error and to fix this i just:
sudo csrutil clear
sudo reboot

after this everything worked like it was supposed to

@ghost
Copy link

ghost commented Nov 3, 2021

@iMactool

You can use latest version of Vagrant (2.2.18) and VirtualBox (6.1.28). If you are currently using 6.1.26 version you can delete it.

Add Homestead.yaml to gui: 1 settings.

---
ip: "192.168.10.10"
memory: 8096
cpus: 4
provider: virtualbox
gui: 1 --> this line

Then destroy your vagrant box with vagrant destroy command.

You should create a network configuration with sudo nano /etc/vbox/networks.conf command. Create /etc/vbox directory if it doesn't exists then create a networks.conf file.

networks.conf

* 0.0.0.0/0 ::/0

Run this block before vagrant up command. Unfortunately running this before every time.

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 run vagrant up command. vagrant reload --provision when it's new vagrant box.

It works for me.

This works for me with Laravel Homestead, I didn't need to destroy the machine

@ghost
Copy link

ghost commented Nov 3, 2021

@alimirayman
Copy link

Same roblem

Failed to open a session for the virtual machine dashboard.

The virtual machine 'dashboard' has terminated unexpectedly during startup with exit code 1 (0x1).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}


@alimirayman
Copy link

Headless on VirtualBox version 6.1.29 is working again, not sure if Vagrant is, someone needs to test it since i'm not using it.

https://www.virtualbox.org/wiki/Testbuilds https://www.virtualbox.org/download/testcase/VirtualBox-6.1.29-147956-OSX.dmg https://www.virtualbox.org/download/testcase/Oracle_VM_VirtualBox_Extension_Pack-6.1.29-147956.vbox-extpack

Installed them, tried to run create a new instance of Ubuntu didn't work, tried to run headless didn't work either

@sirproton
Copy link

I was able to get my VM up and running again with the new macOS update by adding this to the Vagrantfile

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

My current setup has:

Vagrant version: 2.2.18
VirtualBox version: 6.1.28 r147628
macOs version: 12.0.1

@hashicorp hashicorp locked as resolved and limited conversation to collaborators Nov 3, 2021
@chrisroberts
Copy link
Member

Hi everyone,

I'm locking this issue to help people locate the information they need. For a summary of the current issues with Vagrant using the VirtualBox provider on macOS, please see this comment: #12557 (comment)

I've locked the issue as "resolved" since the things that can be addressed by Vagrant (network range validation) has already been completed and will be available in the upcoming release. The other issues being encountered will be fixed once VirtualBox publishes their next maintenance release. Workarounds for these issues can also be found in this comment: #12557 (comment)

Cheers!

@chrisroberts chrisroberts changed the title Vagrant up issues in Mac OS Monterey macOS Monterey and VirtualBox 6.1.28 Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests