VirtualBox 5.1.22 wont start on Mac OS

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
foobar100x
Posts: 4
Joined: 5. Jun 2017, 21:48

VirtualBox 5.1.22 wont start on Mac OS

Post by foobar100x »

Howdy,

I used to have Parallels installed but have since removed it. I am trying to install VirtualBox but having no luck. After a successful install, double clicking on the icon in the Applications folder does nothing. Opening up a terminal and typing VirtualBox gives me the following:
$ VirtualBox
VirtualBox: Error -610 in supR3HardenedMainInitRuntime!
VirtualBox: dlopen("/Applications/VirtualBox.app/Contents/MacOS/VBoxRT.dylib",) failed: <NULL>

VirtualBox: Tip! It may help to reinstall VirtualBox.
With the following log entry:
6/5/17 12:50:13.000 PM kernel[0]: VirtualBox[1357] triggered unnest of range 0x7fff8ce00000->0x7fff8d000000 of DYLD shared region in VM map 0x2ddaf5d50d46e127. While not abnormal for debuggers, this increases system memory footprint until the target exits.
Any help would be greatly appreciated. I have uninstalled and reinstalled several times now.

Cheers,
Bryan
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VirtualBox 5.1.22 wont start on Mac OS

Post by socratis »

foobar100x wrote:VirtualBox: Error -610 in supR3HardenedMainInitRuntime!
Searching for this, shows the logic behind the rejection (from comments in the source code):
Anything VirtualBox loads must be installed with root/wheel as owner/group. The directory loaded from must also be owned by root/wheel and now allow for renaming the file. Similar ownership restrictions applies to all the parent directories (except on darwin).
So, something is not right (permissions-wise) in your OSX setup. Please post the output of the following command from the Terminal (it's easier if you simply copy from here, paste in the Terminal):
  • Code: Select all

    ls -laed \
      / \
      /Applications \
      /Applications/VirtualBox.app \
      /Applications/VirtualBox.app/Contents/MacOS/VBoxRT.dylib \
      /private \
      /private/etc \
      /private/etc/sudoers \
      /private/tmp
    
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
foobar100x
Posts: 4
Joined: 5. Jun 2017, 21:48

Re: VirtualBox 5.1.22 wont start on Mac OS

Post by foobar100x »

Thanks! Here is the output...

Code: Select all

drwxr-xr-x   34 root   wheel        1224 Jun  6 14:51 /
drwxrwxrwx+ 174 bryan  everyone     5916 Jun  5 12:48 /Applications
 0: group:everyone deny delete
drwxr-xr-x    3 root   admin         102 Jun  5 12:48 /Applications/VirtualBox.app
-rw-r--r--    1 root   admin     5086672 Apr 28 08:38 /Applications/VirtualBox.app/Contents/MacOS/VBoxRT.dylib
drwxr-xr-x@   6 root   wheel         204 Jan 30  2016 /private
drwxr-xr-x   93 root   wheel        3162 Jun  6 14:48 /private/etc
-r--r-----    1 root   wheel        2299 Jul 31  2015 /private/etc/sudoers
drwxrwxrwt   25 root   wheel         850 Jun  6 21:22 /private/tmp
So I tried

Code: Select all

$ sudo chgrp -R wheel /Applications/VirtualBox.app
but unfortunately no change
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VirtualBox 5.1.22 wont start on Mac OS

Post by socratis »

foobar100x wrote: So I tried

Code: Select all

$ sudo chgrp -R wheel /Applications/VirtualBox.app
but unfortunately no change
Nope, that is not your problem. The following is/are:
drwxrwxrwx+ 174 bryan  everyone     5916 Jun  5 12:48 /Applications
So you need to issue (at a minimum):
  • sudo chown root:admin /Applications
    sudo chmod o-w /Applications
The first one will give back proper ownership to the "/Applications" folder and the second will remove the write access for the "Others" group (aka everyone and the kitchen sink). It then should look like:
  • $ ls -ald /Applications
    drwxrwxr-x+ 51 root  admin  1734  1 Ιον 23:32 /Applications
Now, you may have other problems because of messed up permissions (most probably) and your system's integrity/security might be compromised. If you're on OSX < 10.12.x, you should try:
  • sudo /usr/libexec/repair_packages --repair --standard-pkgs --volume / --debug
If you're on OSX 10.12.x, you're out of luck, as far as automatically fixing the proper permissions. You sort of have to do it "manually" by comparing a clean system with your system. And you should really send a "Thank you" note to Apple for removing that useless feature...

BTW, have you disabled SIP? I can't see how else the permissions for /Applications could have been set like that...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
foobar100x
Posts: 4
Joined: 5. Jun 2017, 21:48

Re: VirtualBox 5.1.22 wont start on Mac OS

Post by foobar100x »

Wow. First of all a big THANK YOU!

Second, I have not done anything special to my laptop. I do development on it, but nothing that would have disabled SIP. I did a little bit of research and it seems that for my 2016 MacBook, there was a problem that for some users (me), SIP was turned off. Supposedly Apple was/is aware of the problem. Yikes...

Going to boot into Recovery OS now and enable it.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VirtualBox 5.1.22 wont start on Mac OS

Post by socratis »

foobar100x wrote:for my 2016 MacBook, there was a problem that for some users (me), SIP was turned off
Hmm, most probably a faulty OSX build? Do you have a reference for that?

And which model did you have, the 13" with 2-TB (Thunderbolt) ports (10.12, 16A2323a), the 13" 4-TB (10.12.1, 16B2657), or the 15" (10.12.1, 16B2659)? In parentheses the original shipped OSX version with each of them, all were custom/intermediate ones...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
foobar100x
Posts: 4
Joined: 5. Jun 2017, 21:48

Re: VirtualBox 5.1.22 wont start on Mac OS

Post by foobar100x »

Here is the link...

https://discussions.apple.com/thread/77 ... 0&tstart=0

Though my MacBook Pro with 1TB is a Mid 2015 so not sure if it also shipped with the default disabled. I definitely did nothing to explicitly disable it though...

Model Name: MacBook Pro
Model Identifier: MacBookPro11,5
System Version: OS X 10.11.6 (15G1510)
Kernel Version: Darwin 15.6.0

MacBook Pro (Retina, 15-inch, Mid 2015)
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VirtualBox 5.1.22 wont start on Mac OS

Post by socratis »

Interesting... Someone made a big boo-boo and you know that they got fired from Apple. You just know. No questions asked.

Thankfully, Jobs is no longer, otherwise they would have been executed pronto in the center of their new headquarters; it does look like an ancient arena, doesn't it? With a barrage of wild animals against them; cheetahs, pumas, jaguars, panthers, tigers, leopards, snow-leopards, lions and mountain-lions!!! They'd throw everything at them! :evil:
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
JayRizzo
Posts: 1
Joined: 11. Jul 2018, 03:12
Primary OS: Mac OS X other
VBox Version: OSE self-compiled
Guest OSses: Windows, Ubuntu
Location: Lake Elsinore, CA
Contact:

Re: VirtualBox 5.1.22 wont start on Mac OS

Post by JayRizzo »

First Off Thank you for this socratis!

My Info:
Mac: High Sierra 10.13.5
VB: Version 5.2.14 r123301 (Qt5.6.3)
Problem: I reinstalled but it would not open. I opened it in terminal and got
[quote]
jkirchoff$ sudo /Applications/VirtualBox.app/Contents/MacOS/VirtualBox
VirtualBox: Error -610 in supR3HardenedMainInitRuntime!
VirtualBox: dlopen("/Applications/VirtualBox.app/Contents/MacOS/VBoxRT.dylib",) failed: <NULL>

VirtualBox: Tip! It may help to reinstall VirtualBox.[/quote]
My VB would not start and all I had to do was run you two code snippets!
  • sudo chown root:admin /Applications
    sudo chmod o-w /Applications
    
    # alternative
    sudo chown root:admin /Applications/VirtualBox.app/
    
This was a life saver Thank you! Have a great day!

Cheers,

JayRizzo
Last edited by socratis on 11. Jul 2018, 07:53, edited 1 time in total.
Reason: Enclosed the information in [quote] tag for better readability
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VirtualBox 5.1.22 wont start on Mac OS

Post by socratis »

Hey Jay, glad you got it going! :)

Two comments:
  1. You should never use 'sudo' to run VirtualBox. VirtualBox is setup in such a way so as to run even as a Guest on a computer, and the use of 'sudo' is strongly discouraged for security reasons. If you have been doing it so far, you should change your habits/procedures.
  2. The changing of the permissions that you've labeled as '#alternative':
    1. is not an alternative to the previous permissions changes,
    2. it's taken care of by the VirtualBox installer's 'postflight' installer script, recursively actually:
      #
      # Correct the ownership of the directories in case there
      # was an existing installation.
      #
      chown -R root:admin /Applications/VirtualBox.app
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply