Cannot start VirtualBox on macOS Monterey

Discussions related to using VirtualBox on Mac OS X hosts.
granada29
Volunteer
Posts: 690
Joined: 3. Mar 2015, 07:27
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS, Windows

Re: Cannot start VirtualBox on macOS Monterey

Post by granada29 »

zenon1 wrote: ...
Only Apple can allow these extensions loading at start up. May be in 10 years they will understand that they were
a bit too restrictive .
The reason the VirtualBox kexts are not loading at system startup is due to a bug in the VirtualBox shell script that does the loading under macOS Monterey. The bug has been acknowledged by the VirtualBox devs and will be fixed in the next release of VirtualBox.

I agree that Apple are being very restrictive, but that is not the reason the VirtualBox kexts are not being loaded.
zenon1
Posts: 14
Joined: 26. Oct 2021, 15:56

Re: Cannot start VirtualBox on macOS Monterey

Post by zenon1 »

granada29 wrote:
zenon1 wrote: ...
Only Apple can allow these extensions loading at start up. May be in 10 years they will understand that they were
a bit too restrictive .
The reason the VirtualBox kexts are not loading at system startup is due to a bug in the VirtualBox shell script that does the loading under macOS Monterey. The bug has been acknowledged by the VirtualBox devs and will be fixed in the next release of VirtualBox.

I agree that Apple are being very restrictive, but that is not the reason the VirtualBox kexts are not being loaded.
Hi,

I am glad to read it. VMware runs perfectly on Monterey, so why not VirtualBox ?
Franklin S Werren
Posts: 7
Joined: 8. Jul 2021, 19:21
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows 10, Linux

Re: Cannot start VirtualBox on macOS Monterey

Post by Franklin S Werren »

Might as well add Monterey 12.1 to the list of Virtual Box issues
Unable to start up Guest on that OS as well.
Funny, everything else runs fine on 12.1
Tonubg
Posts: 3
Joined: 3. Nov 2021, 17:01

Re: Cannot start VirtualBox on macOS Monterey

Post by Tonubg »

Hello colleagues, I have the following difficulties

Kernel driver not installed (rc=- 1908)
after updating to 12,0,1 monterey I had no problems with virtual box (version 6.1.28) I restarted and everything worked. But today, without making any changes, the mistake came out of nowhere.
can you help me with advice on what to do.

In security & privacy don’t have options for
"Allow" System software from developer "Oracle America, Inc." was blocked from loading/.
Higgi
Posts: 1
Joined: 4. Nov 2021, 16:06

Re: Cannot start VirtualBox on macOS Monterey

Post by Higgi »

I was able to get Virtualbox back to work on Monterey.
I reinstalled Virtualbox and then my VMs (Linux/Windows) got back to life.

After a restart of the Mac I have to start over installing Virtualbox again.

So unfortunately half way solved. Just a workaround for me.

Virtualbox 6.1.28 r147628 on Monterey 12.0.1
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Cannot start VirtualBox on macOS Monterey

Post by scottgus1 »

SoCalDude
Posts: 6
Joined: 4. Nov 2021, 21:21

Re: Cannot start VirtualBox on macOS Monterey

Post by SoCalDude »

I spent 2-3 hours trying countless different methods to get VirtualBox working on macOS Monterey 12.0.1 but I finally found a method that worked best for me and as my first post in this forum I wanted to share in case maybe it helps someone else. I take no credit for anything as it's all posted here by others, I'm simply sharing the sequence that worked best for me.

Things I tried...

> Installing 6.1.29, but could not get the approval box in System Preferences > Security & Privacy to show up allowing me to approve the kernel extension. Tried multiple restarts, uninstalls & reinstalls just couldn't get it for whatever reason.

> Installing 6.1.28 over and over again using the uninstall tool each time but still could not get the approval box in Security & Privacy to show up. Tried restarting several times, couldn't get it to go.

> Tried restarting & booting into macOS Recovery to run this command in terminal "kext-consent add VB5E2TV963" but after rebooting and trying everything on 6.1.29 again, still no luck.

> After 5-10 uninstalls and reinstalls of 6.1.29 I found other users showing the 4 terminal commands to manually load the kernel extensions after each reboot however even in terminal I got errors like this...

Code: Select all

Mac-Pro:~ SoCalDude$ sudo kextload -b org.virtualbox.kext.VBoxDrv
Executing: /usr/bin/kmutil load -b org.virtualbox.kext.VBoxDrv
Error Domain=KMErrorDomain Code=27 "Extension with identifiers org.virtualbox.kext.VBoxNetFlt,org.virtualbox.kext.VBoxDrv,org.virtualbox.kext.VBoxUSB,org.virtualbox.kext.VBoxNetAdp not approved to load. Please approve using System Preferences." 
> Getting very frustrated that others say it works but everything I tried is failing I tried one more time to load the kext manually but this time on 6.1.28

Code: Select all

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 this time it WORKED. However, to be clear, only the "Normal" start is working for me, Headless & Detachable both still result in the NS_ERROR_FAILURE error. But hey for now at least up and running again. I understand I will need to manually reload the kext after each reboot.


I guess I could have summarized it as...
- Manually loading kext in 6.1.29 does not work but works in 6.1.28
- Reload kext after each restart required.
- Only "normal" start currently working.

Hope I saved someone some headache!
riso
Posts: 16
Joined: 28. Oct 2020, 13:25

Re: Cannot start VirtualBox on macOS Monterey

Post by riso »

I am using 6.1.29 r147956 few days, without any problem.( I do not restart my mac at all ) Headless is working, so I am happy. But you have to disable SIP.
zenon1
Posts: 14
Joined: 26. Oct 2021, 15:56

Re: Cannot start VirtualBox on macOS Monterey

Post by zenon1 »

riso wrote:I am using 6.1.29 r147956 few days, without any problem.( I do not restart my mac at all ) Headless is working, so I am happy. But you have to disable SIP.
hi,

Do you mean disable SIP when installating or permanently ? If you have to disable SIP permanently this is a failure in VB 6.1.29
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: Cannot start VirtualBox on macOS Monterey

Post by fth0 »

zenon1 wrote:Do you mean disable SIP when installating or permanently ? If you have to disable SIP permanently this is a failure in VB 6.1.29
AFAIU, the VirtualBox test builds are usually not notarized, and you have to disable SIP "permanently" to have the VirtualBox kernel extensions loaded while booting.
kolla
Posts: 3
Joined: 6. Nov 2021, 07:16

Re: Cannot start VirtualBox on macOS Monterey

Post by kolla »

zenon1 wrote: The trick is that Apple rejects these kernel extensions which now with Monterey are not considered
as belonging to the OS system. Apple as usually is a bit wothering. Oracle can't do much with this restriction.
Only Apple can allow these extensions loading at start up. May be in 10 years they will understand that they were
a bit too restrictive .
The trick is that Oracle have sucky script writers who have not taken into account that there might be macOS releases past major release 11...

Look at lines 100, 145 and 225 in `/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh`

Code: Select all

if [[ ${MACOS_VERS} != 11.* ]];
well, macOS 12.0.1 is "not equal" 11, so it will try to do what is in that "if" instead of jumping to the "else" as it should.

Oracle devs should have known that a macOS 12 would be more likely to follow 11, and hence should have written someting like this...

Code: Select all

if [[ ${MACOS_VERS%%.*} -lt 11 ]];
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot start VirtualBox on macOS Monterey

Post by mpack »

kolla wrote: The trick is that Oracle have sucky script writers who have not taken into account that there might be macOS releases past major release 11...
The user manual (section 1.4) lists supported MacOS hosts. Which of those do you speak of, that the devs mistakenly failed to take into account?
kolla
Posts: 3
Joined: 6. Nov 2021, 07:16

Re: Cannot start VirtualBox on macOS Monterey

Post by kolla »

mpack wrote:
kolla wrote: The trick is that Oracle have sucky script writers who have not taken into account that there might be macOS releases past major release 11...
The user manual (section 1.4) lists supported MacOS hosts. Which of those do you speak of, that the devs mistakenly failed to take into account?
That is no excuse for writing sucky shell scripts with hard coded values that need to be maintained throughout whenever there is new OS release.
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Cannot start VirtualBox on macOS Monterey

Post by Martin »

The current VirtualBox release doesn't claim to support Monterey, so a startup script which doesn't consider version 12 is absolutely ok.
MattyMatt
Posts: 7
Joined: 25. Oct 2021, 16:22

Re: Cannot start VirtualBox on macOS Monterey

Post by MattyMatt »

zenon1 wrote:
Hi,

I am glad to read it. VMware runs perfectly on Monterey, so why not VirtualBox ?
If you don't think VirtualBox is quick enough to update in response to new OS updates, you're free to use other products like VMWare which may provide the responsiveness that you desire/require. There's more than one show in town and each needs to be evaluated along a variety of axis including: reliability, stability, cost, being current, etc..
Locked