5.1.22/5.0.38 install on MacOS 10.12.4

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
tyzonn
Posts: 4
Joined: 13. May 2017, 20:21

5.1.22/5.0.38 install on MacOS 10.12.4

Post by tyzonn »

Hi -
I've had a horrible time time installing either 5.1.22 or 5.0.38 on a new macbook pro.
I've resolved it, but wanted to share my experience, since it's been a bit painful to debug.

Installing (either version, using the dmg downloads) always ends with a failure, install.log always contains the failure message on loading VBoxUSB.kext:

Code: Select all

May 13 10:56:12 tnorris-macOS installd[637]: PackageKit: Executing script "./postflight" in /private/tmp/PKInstallSandbox.Xn8SB0/Scripts/org.virtualbox.pkg.vboxkexts.CoySf2
May 13 10:56:12 tnorris-macOS installd[637]: ./postflight: /Library/Application Support/VirtualBox/VBoxUSB.kext failed to load - (libkern/kext) not loadable (reason unspecified); check the system/kernel logs for errors or try kextutil(8).
May 13 10:56:12 tnorris-macOS install_monitor[2736]: Re-included: /Applications, /Library, /System, /bin, /private, /sbin, /usr
May 13 10:56:13 tnorris-macOS installd[637]: PackageKit: releasing backupd
May 13 10:56:13 tnorris-macOS installd[637]: PackageKit: allow user idle system sleep
May 13 10:56:13 tnorris-macOS installd[637]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “VirtualBox.pkg”." UserInfo={NSFilePath=./postflight, NSURL=file://localhost/Volumes/VirtualBox/VirtualBox.pkg#VBoxKEXTs.pkg, PKInstallPackageIdentifier=org.virtualbox.pkg.vboxkexts, NSLocalizedDescription=An error occurred while running scripts from the package “VirtualBox.pkg”.} {
            NSFilePath = "./postflight";
            NSLocalizedDescription = "An error occurred while running scripts from the package \U201cVirtualBox.pkg\U201d.";
            NSURL = "file://localhost/Volumes/VirtualBox/VirtualBox.pkg#VBoxKEXTs.pkg";
            PKInstallPackageIdentifier = "org.virtualbox.pkg.vboxkexts";
        }
After some digging, I see what looks like an invalid signature using:

Code: Select all

$ sudo kextutil -d "/Library/Application Support/VirtualBox/VBoxDRV.kext" "/Library/Application Support/VirtualBox/VBoxUSB.kext"
Password:
Warnings: 
    Dependency lacks appropriate value for OSBundleRequired and may not be availalble during early boot: 
        org.virtualbox.kext.VBoxDrv - OSBundleRequired not set

Untrusted kexts are not allowed
ERROR: invalid signature for com.apple.iokit.IOUSBFamily, will not load
Signature failure in dependencies for kext load request.
I noticed that I can load all other kexts fine, so I updated /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh to remove the load of VBoxUSB.kext:

Code: Select all

#        ConsoleMessage "Loading ${VBOXUSB}.kext"
#        if ! kextload -d "/Library/Application Support/VirtualBox/${VBOXDRV}.kext" "/Library/Application Support/VirtualBox/${VBOXUSB}.kext"; then
#            ConsoleMessage "Error: Failed to load /Library/Application Support/VirtualBox/${VBOXUSB}.kext"
#            VBOX_RC=1
#        fi
Now I can happily run 5.1.22 on my 10.12.4 host. I assume any usb access within my vms will be broken, but that is OK in my case.

Can anyone confirm seeing this issue? Is there a better workaround?

Thanks
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: 5.1.22/5.0.38 install on MacOS 10.12.4

Post by socratis »

EXCELLENT!!!
Someone finally did some digging! THANK YOU!!!

The installer failure at the 'postflight' has been reported as the main cause of VirtualBox failing to install. Not a single person (I've been begging for a long time) has had the inclination to try to do a 'sudo kextutil' and report back. I'm on 10.9.5 and the only thing that I have available are my OSX VMs. And of course it never failed there, so, I couldn't replicate the results.

Now, from what the error message says, the problem seems to be in the com.apple.iokit.IOUSBFamily, which is from highly unusual to highly suspect.

I'll be looking into that a little bit more, but could you please tell me 1) if you've modified your system, including 3rd party apps and frameworks and 2) if your updates are on "Automatic", because there were problems with that before.
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.
tyzonn
Posts: 4
Joined: 13. May 2017, 20:21

Re: 5.1.22/5.0.38 install on MacOS 10.12.4

Post by tyzonn »

Sure thing:
1) if you've modified your system, including 3rd party apps and frameworks and

Indeed, I have modified the system, in all the typical ways: filevault, homebrew, mcafee, docker, etc. However, it MAY also be worth noting that the system where VB installer failed consistently, is the SAME machine where it worked fine a few weeks ago. The main difference in that time frame is that the machine received a NEW motherboard and SSD. Unfortunately I did not note the specific OS version and configuration before replacement, but I definitely had VB installed with no problems. FWIW, I did try disabling filevault and mcafee with no different results when trying to get the installer to work. Sorry I can't be more helpful there, other than claiming to have a "typical" set of software development software installed.
2) if your updates are on "Automatic", because there were problems with that before.
When the system came to me automatic updates were enabled. I disabled all automatic updates, rebooted many times, and experienced the same failures during installer runs, with the same errors reported in install.log. The first times I ran the installer, auto-updates had already been enabled, but as far as I know, no updates arrived between the time I first ran the installers, and the time I disabled auto updates. (got the machine on Thursday, had installer issues on that same day)

I'm curious if someone wither similar setup (2017 MacBook Pro+MacOS10.12.4+FileVault) has the same result from the kextutil command?

Code: Select all

sudo kextutil -d "/Library/Application Support/VirtualBox/VBoxDRV.kext" "/Library/Application Support/VirtualBox/VBoxUSB.kext"
Based on the com.apple.iokit.IOUSBFamily mention in the error, I'm guessing that I won't be the only one to have this issue, but its not clear what would enable the VBoxUSB.kext to work on some machines and not others (or maybe not enough folks have updated to 10.12.4 yet?). I haven't heard from any colleagues on this issue either, but similarly could be that they haven't updated recently. On kextutil, it would be nice if the installer ran the kextutil command in case of failure, so that this info on why a kext failed can be surfaced in the install.log itself.

Thanks
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: 5.1.22/5.0.38 install on MacOS 10.12.4

Post by socratis »

tyzonn wrote:in all the typical ways: filevault, homebrew, mcafee, docker, etc.
I've been developing on a Mac since the G3 days and none of the above modifications/changes would be characterized as "typical". Far from it. That's not to say that this is/should be a problem. Au contraire.
tyzonn wrote:the machine received a NEW motherboard and SSD.
Would it be safe to assume that the new HD (SSD, whatever) came with a new instance of OSX? Or did you restore your previous HD to the new one? That's what's important, not the motherboard nor the fact that it's an SSD vs. rotational media. It's the existing vs. new OSX installation.
tyzonn wrote:I did try disabling filevault and mcafee with no different results
I wouldn't expect the results to be different. If there is something wrong with the signatures in "com.apple.iokit.IOUSBFamily", it won't get fixed by installing/uninstalling/disabling/enabling another piece of software.
tyzonn wrote:The first times I ran the installer, auto-updates had already been enabled, but as far as I know, no updates arrived between the time I first ran the installers, and the time I disabled auto updates.
But the "damage" could have already been done with the 10.12.4 update. Could you (and that's not a guarantee) re-run the 10.12.4 combo update? Maybe something that's out of whack in there gets jolted back into position.

Since this is an area that I haven't dug into in the past, I'll be doing some searching to see what I can come up with. We then should start comparing notes about the certificate/signature status of the affected extension.
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.
tyzonn
Posts: 4
Joined: 13. May 2017, 20:21

Re: 5.1.22/5.0.38 install on MacOS 10.12.4

Post by tyzonn »

I have downloaded, but NOT run the 10.12.4 combo update.

I just noticed that 10.12.5 update is released.

Do you prefer I run the combo update first? or the 10.12.5 update?

I will try it out tomorrow, and run the installer to see if it starts working...
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: 5.1.22/5.0.38 install on MacOS 10.12.4

Post by socratis »

Well, you should try the 10.12.4 combo first, because if you go for the 10.12.5 combo you can't go to 10.12.4 again.
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.
tyzonn
Posts: 4
Joined: 13. May 2017, 20:21

Re: 5.1.22/5.0.38 install on MacOS 10.12.4

Post by tyzonn »

Well, I had low expectations but the combo update to 10.12.4 worked, the installer for 5.1.22 ran perfectly this time!

Specifically, I did:
- uninstalled virtualbox using VirtualBox_Uninstall.tool
- reboot
- ran the combo update installer for 10.12.4 (from downloaded macOSUpdCombo10.12.4.dmg)
- after combo update installer completed and I was logged in, reboot again
- run the 5.1.22 VirtualBox.pkg installer (from downloaded VirtualBox-5.1.22-115126-OSX.dmg)

installer ran fine with default options!

Also, verified via

Code: Select all

kextstat | grep VB
that all kexts are available: VBoxDrv, VBoxUSB, VBoxNetFlt, VBoxNetAdp

Next I will update to 10.12.5, hopefully it will keep working. (I'll post back tomorrow if it does not...)

Thanks
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: 5.1.22/5.0.38 install on MacOS 10.12.4

Post by socratis »

tyzonn wrote:the combo update to 10.12.4 worked, the installer for 5.1.22 ran perfectly this time!
Hip hip hooray!!! :D
My suspicions were correct. Every time the installer failed to load a VirtualBox kext, it was from people that had automatic updates enabled. Somehow, somewhere Apple's automatic updates are missing something. My feeling is some sort of certificate renewal.

Really glad you got that going!
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