Running virtualbox 6.1.28r147628 on OSX 12.0.1 (montery)

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
Frits Hoogland
Posts: 5
Joined: 4. Jul 2021, 16:50

Running virtualbox 6.1.28r147628 on OSX 12.0.1 (montery)

Post by Frits Hoogland »

I do post this topic because I can't find the below information in a single post.
I am not sure why the other Monterey thread is locked.

1. When installing virtualbox on OSX, it will fail. In Preferences, Security, General, VirtualBox/Oracle needs to be added as allowed identities. After that, the installation should succeed.
2. The kernel modules are not loaded, because the VirtualBoxStartup.sh script does only check for Big Sur for an alternative way of loading the virtualbox kernel modules.
Edit '/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh' (as root/via sudo), and change:
At line 73, add:

Code: Select all

MACOS_MAJOR_VERSION=$(sw_vers -productVersion |  sed 's/\([0-9]*\).*/\1/')
At line 101, change:

Code: Select all

if [[ ${MACOS_VERS} != 11.* ]]; then
to

Code: Select all

if [[ ${MACOS_MAJOR_VERSION} -lt 11 ]]; then
At line 146, perform the same change of checking for a the MacOS major to lesser than 11.
This script is executed at startup time, and will load the needed kernel modules.
If you just done this, you can execute 'sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart' or restart your Mac.
3. When starting up a virtual machine in headless mode, it will fail:

Code: Select all

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

Command: ["startvm", "622d3cc8-858f-4237-b102-1b6167ecaa70", "--type", "headless"]

Stderr: VBoxManage: error: The virtual machine 'alma8-rf1_yb-1_1634050416725_18262' has terminated unexpectedly during startup because of signal 10
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
I use vagrant, but this fails without vagrant too.
The blunt solution to this is to startup the VMs not in headless mode (in vagrant: set the virtualbox property 'gui' to true (default false, which means headless mode):

Code: Select all

      subconfig.vm.provider :virtualbox do |vb|
        vb.gui = true
Hopefully these will be corrected in a new version so Virtualbox will install without issues again.
riso
Posts: 16
Joined: 28. Oct 2020, 13:25

Re: Running virtualbox 6.1.28r147628 on OSX 12.0.1 (montery)

Post by riso »

Thank you Frits.
Same code changes should be applied in method StopService at lines 223 and 225
Frits Hoogland
Posts: 5
Joined: 4. Jul 2021, 16:50

Re: Running virtualbox 6.1.28r147628 on OSX 12.0.1 (montery)

Post by Frits Hoogland »

There is another issue that I found: hostonly networking is more limited, which is documented, but very easily to be missed.
In order to allow hostonly networks to use 10/8 and 192.168/16 networks on OSX:
1. Add the directory /etc/vbox
2. Create a file networks.conf and add the following lines:
* 10.0.0.0/8 192.168.0.0/16
* 2001::/64
klaus
Oracle Corporation
Posts: 1110
Joined: 10. May 2007, 14:57

Re: Running virtualbox 6.1.28r147628 on OSX 12.0.1 (montery)

Post by klaus »

Thanks Frits... a variation of the proposed change will be soon in a test build. Really odd that this got past our testing with the Monterey BETA.
BigBobbyD
Posts: 3
Joined: 30. Oct 2021, 14:01

Re: Running virtualbox 6.1.28r147628 on OSX 12.0.1 (montery)

Post by BigBobbyD »

Thanks for the tip, however, I made the changes as indicated in the startup script. Still doesn't work. Seems rather odd since I can re-install the VirtualBox from the.dmg and my Virtual machine runs fine, until I reboot my Mac then I receive the error codes. So the verification of the O.S. in the startup script doesn't appear to be an issue, rather something else
oh well, perhaps the next update of Monterey Jack or from Oracle will correct the issue, for now I will just keep the .dmg in my download folder and re-install every morning when I turn my Mac on.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Running virtualbox 6.1.28r147628 on OSX 12.0.1 (montery)

Post by fth0 »

klaus wrote:a variation of the proposed change will be soon in a test build
Some of the known VirtualBox 6.1.28 issues with macOS 12 Monterey have been fixed in the VirtualBox test builds 6.1.29r147956 and newer.
Post Reply