Installation fails on Mac OS X 10.12.3

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
simon211
Posts: 2
Joined: 11. Feb 2017, 04:27

Installation fails on Mac OS X 10.12.3

Post by simon211 »

Hardware: MacBookPro11,5 @ 2.50 GHz (x 8), 16384 MB RAM
Running OS Build: Mac OS X 10.12.3 (16D32)

When trying to run Vagrant I got the following error from VirtualBox:

Code: Select all

==> default: Setting the name of the VM: virtual_machine_default_1486780208420_46334
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 8081 (guest) => 8081 (host) (adapter 1)
    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", "0d5137be-ca48-49f5-a2e3-e82a28934aef", "--type", "headless"]

Stderr: VBoxManage: error: The virtual machine 'virtual_machine_default_1486780208420_46334' has terminated unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
I tried upgrading Virtualbox to the latest version (5.1.14) as well as uninstalling (using VirtualBox_Uninstall.tool) and trying an older version (5.0.32), but the install keeps failing during postflight step:

Code: Select all

Feb 10 18:29:20 Simons-MacBook-Pro-2 installd[327]: ./postflight: /Library/Application Support/VirtualBox/VBoxDrv.kext failed to load - (libkern/kext) kext (kmod) start/stop routine failed; check the system/kernel logs for errors or try kextutil(8).
Complete installer logs are attached.
Installer Log 10-Feb-2017.txt.zip
(2.89 KiB) Downloaded 42 times
I uninstalled Docker, Homebrew, VPN clients and anything else I did not need.

I ran the VirtualBox_Uninstall.tool twice (and then rebooted) and then ran the VirtualBox_Uninstall.tool again before trying to install and followed all of the other troubleshooting steps I could find in the forums to no avail.

I verified that everything under was removed:

Code: Select all

    /usr/local/bin/VirtualBox
    /usr/local/bin/VBoxManage
    /usr/local/bin/VBoxVRDP
    /usr/local/bin/VBoxHeadless
    /usr/local/bin/vboxwebsrv
    /usr/local/bin/VBoxBugReport
    /usr/local/bin/VBoxBalloonCtrl
    /usr/local/bin/VBoxAutostart
    /usr/local/bin/VBoxDTrace
    /usr/local/bin/vbox-img
    /Library/LaunchDaemons/org.virtualbox.startup.plist
    /Library/Application Support/VirtualBox/LaunchDaemons/
    /Library/Application Support/VirtualBox/VBoxDrv.kext/
    /Library/Application Support/VirtualBox/VBoxUSB.kext/
    /Library/Application Support/VirtualBox/VBoxNetFlt.kext/
    /Library/Application Support/VirtualBox/VBoxNetAdp.kext/
    /Applications/VirtualBox.app/
Terminal output per other post:

Code: Select all

Simons-MacBook-Pro-2:~ simono$ ls -ale@ /
total 69
drwxr-xr-x  34 root  wheel   1224 Feb 10 18:21 .
drwxr-xr-x  34 root  wheel   1224 Feb 10 18:21 ..
-rw-rw-r--   1 root  admin  10244 Feb 10 18:09 .DS_Store
d--x--x--x   9 root  wheel    306 Feb 10 18:21 .DocumentRevisions-V100
drwxr-xr-x   2 root  admin     68 Nov 10  2015 .PKInstallSandboxManager
drwxr-xr-x@  3 root  wheel    102 Feb  1 16:49 .PKInstallSandboxManager-SystemSoftware
	com.apple.rootless	    0
drwx------   5 root  wheel    170 Mar 12  2016 .Spotlight-V100
d-wx-wx-wt   2 root  wheel     68 May 18  2016 .Trashes
srwxrwxrwx   1 root  wheel      0 Feb 10 18:21 .dbfseventsd
----------   1 root  admin      0 Sep 28 16:16 .file
drwx------  81 root  wheel   2754 Feb 10 18:35 .fseventsd
drwxr-xr-x   3 root  wheel    102 Sep 15 15:26 .gem
drwxr-xr-x@  2 root  wheel     68 Oct 21 15:58 .vol
	com.apple.FinderInfo	   32
drwxrwxr-x+ 56 root  admin   1904 Feb 10 18:36 Applications
 0: group:everyone deny delete
drwxr-xr-x+ 62 root  wheel   2108 Jan  4 19:26 Library
 0: group:everyone deny delete
drwxr-xr-x@  2 root  wheel     68 Oct 21 15:58 Network
	com.apple.FinderInfo	   32
drwxr-xr-x@  4 root  wheel    136 Feb  1 16:51 System
	com.apple.rootless	    0
 0: group:everyone deny delete
drwxr-xr-x   5 root  admin    170 Oct 21 15:58 Users
drwxr-xr-x@  4 root  wheel    136 Feb 10 18:22 Volumes
	com.apple.FinderInfo	   32
 0: group:everyone deny add_file,add_subdirectory,directory_inherit,only_inherit
drwxr-xr-x@ 38 root  wheel   1292 Feb  1 16:51 bin
	com.apple.FinderInfo	   32
	com.apple.rootless	    0
drwxrwxr-t@  2 root  admin     68 Oct 21 15:58 cores
	com.apple.FinderInfo	   32
dr-xr-xr-x   3 root  wheel   4393 Feb 10 18:21 dev
lrwxr-xr-x@  1 root  wheel     11 Oct 21 15:57 etc -> private/etc
	com.apple.FinderInfo	   32
	com.apple.rootless	    0
dr-xr-xr-x   2 root  wheel      1 Feb 10 18:26 home
-rw-r--r--@  1 root  wheel    313 Jul 30  2016 installer.failurerequests
	com.apple.FinderInfo	   32
dr-xr-xr-x   2 root  wheel      1 Feb 10 18:26 net
drwxr-xr-x@  7 root  wheel    238 Jan 31 09:54 opt
	com.apple.FinderInfo	   32
drwxr-xr-x@  6 root  wheel    204 Oct 21 15:58 private
	com.apple.FinderInfo	   32
drwxr-xr-x@ 63 root  wheel   2142 Feb  1 16:50 sbin
	com.apple.FinderInfo	   32
	com.apple.rootless	    0
lrwxr-xr-x@  1 root  wheel     11 Oct 21 15:57 tmp -> private/tmp
	com.apple.FinderInfo	   32
	com.apple.rootless	    0
drwxr-xr-x@ 12 root  wheel    408 Jan  6 10:35 usr
	com.apple.FinderInfo	   32
	com.apple.rootless	    0
lrwxr-xr-x@  1 root  wheel     11 Oct 21 15:57 var -> private/var
	com.apple.FinderInfo	   32
	com.apple.rootless	    0

Simons-MacBook-Pro-2:~ simono$ ls -ale@ /private/tmp
total 0
drwxrwxrwt  5 root    wheel  170 Feb 10 18:39 .
drwxr-xr-x@ 6 root    wheel  204 Oct 21 15:58 ..
	com.apple.FinderInfo	 32
-rw-rw-rw-@ 1 simono  wheel    0 Feb 10 18:21 .keystone_install_lock
	com.apple.quarantine	 28
drwx------  4 simono  wheel  136 Feb 10 18:29 .vbox-simono-ipc
drwx------  4 root    wheel  136 Feb  1 16:50 PKInstallSandbox.RZa9mm
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Installation fails on Mac OS X 10.12.3

Post by socratis »

EXCELLENT job for providing the information and for following previous troubleshooting steps in other posts!!! You saved us quite a few of back and forth messages.
simon211 wrote:When trying to run Vagrant
simon211 wrote:I uninstalled Docker, Homebrew, VPN clients and anything else I did not need.
What about Vagrant? Did you uninstall Vagrant?

Before that, had you ever tried to install a standalone VirtualBox? If yes, what version and what OSX version?

Finally, do you have automatic updates enabled in your host?

Oh, and you have the following directory: "/private/tmp/.vbox-simono-ipc". Reboot your host, delete that directory and try again. Not that I believe that it's going to fix things but you never know...
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.
simon211
Posts: 2
Joined: 11. Feb 2017, 04:27

Re: Installation fails on Mac OS X 10.12.3

Post by simon211 »

Thanks for your response and suggestions.

Yes, I had successfully run and upgraded VirtualBox 5.0.32 and 5.1.10 under Mac OS X 10.11.x and 10.12.3.

Yes, I have automatic updates enabled.

Deleting "/private/tmp/.vbox-simono-ipc" did not help. I also tried creating a second user account on my Mac, but installing VirtualBox there gave the same error.

So I did a re-install of Sierra from the recovery console per (and did not lose any installed applications or configurations):

http://www.imore.com/how-install-fresh- ... a-your-mac

Then installed and ran VirtualBox 5.1.14 (and Vagrant) successfully. This indicates to me that there was some system file modification or corruption that needed to be corrected.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Installation fails on Mac OS X 10.12.3

Post by socratis »

simon211 wrote:Yes, I have automatic updates enabled.
simon211 wrote:This indicates to me that there was some system file modification or corruption that needed to be corrected.
Congratulations sir! You've found the culprit: automatic updates! (which I suspected, that why I asked). I *still* don't know what's going on and what's failing, but, I've noticed a pattern and I have a theory:
  • Automatic updates are on.
  • Minor versions updates are issued (X.X.y to X.X.z).
  • All system's checks after the update are fine. And then some.
  • VirtualBox fails for no apparent reason to load the kernel extension (kext). Or, more accurately, the system fails to load the VirtualBox kexts.
  • I think it happens only if VirtualBox was already installed before the update occurred.
  • I believe, based on the previous hints, that it might have something to do with corrupted system kext cache which prevents the VirtualBox kexts from updating correctly, although in the surface they do.
You re-installed the OS. I would have directed you (as a first troubleshooting step) to apply the 10.12.3 *combo* update, hoping that it would reset something. Then, we would go to more drastic measures, like system cache removal, kext rebuilding, etc. Thankfully they've made re-installing OSX a piece of cake, which I believe it's much easier compared to troubleshooting. Frankly, unless you have *really* modified your system (I'm talking /etc/config* stuff), it's the easiest way.

Glad it worked and thanks for adding another data point to the automatic update "theory".
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