Installation fails on 10.13.x, 10.14.x (rc=-1908)

Discussions related to using VirtualBox on Mac OS X hosts.

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby TheQL » 4. Nov 2020, 22:32

Hi,

I also need to add to this thread...
I updated VirtualBox from 6.1.8 to 6.1.16 on my Mac running Mojave and the installer failed with "The installation failed. The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance."

I remebered this to be common and usually you just need to allow the kernel extensions in "Preferences > Security & Privacy > General". But nothing was there, also I would expect that on a fresh install not an update. VirtualBox ran just fine before the update!

I checked the loaded kexts, but nothing:
Code: Select all   Expand viewCollapse view
# kextstat | grep -i virt
  159    0 0xffffff7f8491e000 0x13000    0x13000    com.apple.driver.AppleVirtIO (2.1.3) CAFDF80E-E7BD-3916-9BB0-41F51B5A6471 <79 21 13 6 5 3 1>


I did some googling and found several threads on different forums and tried some of the suggestions.

I ran
Code: Select all   Expand viewCollapse view
# sudo spctl --master-disable

and tried again. No change. I ran the uninstall.tool and installed again. Did that again but rebooted in-between.

Found this script and tried to load/unload the kexts that way and get them to appear in Preferences:
Code: Select all   Expand viewCollapse view
# bash -x vbox_kext.sh
+ case "$1" in
+ unload
++ ps -ef
++ grep -c 'VirtualBox$'
+ '[' 0 -ne 0 ']'
++ ps -ef
++ grep -c '[V]ir'
+ '[' 0 -gt 0 ']'
+ echo 'Unloading Kernel Extensions'
Unloading Kernel Extensions
+ kextstat
+ grep org.virtualbox.kext.VBoxUSB
+ kextstat
+ grep org.virtualbox.kext.VBoxNetFlt
+ kextstat
+ grep org.virtualbox.kext.VBoxNetAdp
+ kextstat
+ grep org.virtualbox.kext.VBoxDrv
+ load
+ echo 'Loading Kernel Extentions'
Loading Kernel Extentions
+ sudo kextload '/Library/Application Support/VirtualBox/VBoxDrv.kext' -r '/Library/Application Support/VirtualBox/'
Password:
/Library/Application Support/VirtualBox/VBoxDrv.kext failed to load - (libkern/kext) not loadable (reason unspecified); check the system/kernel logs for errors or try kextutil(8).
+ sudo kextload '/Library/Application Support/VirtualBox/VBoxNetAdp.kext' -r '/Library/Application Support/VirtualBox/'
/Library/Application Support/VirtualBox/VBoxNetAdp.kext failed to load - (libkern/kext) not loadable (reason unspecified); check the system/kernel logs for errors or try kextutil(8).
+ sudo kextload '/Library/Application Support/VirtualBox/VBoxNetFlt.kext' -r '/Library/Application Support/VirtualBox/'
/Library/Application Support/VirtualBox/VBoxNetFlt.kext failed to load - (libkern/kext) not loadable (reason unspecified); check the system/kernel logs for errors or try kextutil(8).
+ sudo kextload '/Library/Application Support/VirtualBox/VBoxUSB.kext' -r '/Library/Application Support/VirtualBox/'
/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).


I then went to rescue mode and ran
Code: Select all   Expand viewCollapse view
# /usr/sbin/spctl kext-consent add VB5E2TV963

I got the ID from
Code: Select all   Expand viewCollapse view
# cd '/Library/Application Support/VirtualBox/'
# spctl -a -vv -t install VBoxNetAdp.kext
VBoxNetAdp.kext: accepted
source=Notarized Developer ID
override=security disabled
origin=Developer ID Application: Oracle America, Inc. (VB5E2TV963)


and re-tried all of the above. Never did I see any prompt to allow the extension in Preferences.
Compare (the consent-list was empty before I did that):
Code: Select all   Expand viewCollapse view
# spctl kext-consent list
Allowed Team Identifiers:
VB5E2TV963


As a last resort I then re-entered rescue mode and entered
Code: Select all   Expand viewCollapse view
# csrutil disable

and rebooted. Without any further intervention the kexts were loaded and VirtualBox worked.

Code: Select all   Expand viewCollapse view
# kextstat | grep -i virt
  111    3 0xffffff7f83ee0000 0xf2000    0xf2000    org.virtualbox.kext.VBoxDrv (6.1.16) DAF044F0-5043-3B8E-8758-5A462567BDAA <8 6 5 3 1>
  164    0 0xffffff7f848ce000 0x13000    0x13000    com.apple.driver.AppleVirtIO (2.1.3) CAFDF80E-E7BD-3916-9BB0-41F51B5A6471 <79 21 13 6 5 3 1>
  166    0 0xffffff7f848e1000 0x8000     0x8000     org.virtualbox.kext.VBoxUSB (6.1.16) CA33FA52-5933-3F0E-9B40-8B1ECF4D6A36 <165 111 64 8 6 5 3 1>
  184    0 0xffffff7f85c6b000 0x5000     0x5000     org.virtualbox.kext.VBoxNetFlt (6.1.16) C93EAF6A-676F-3370-BAE2-BDFD2BF16582 <111 8 6 5 3 1>
  185    0 0xffffff7f85c70000 0x6000     0x6000     org.virtualbox.kext.VBoxNetAdp (6.1.16) 76200407-D2F0-3D84-BCCF-7EEA18F16654 <111 6 5 1>


But when I enable csrutil again I am back to where I came from.

Code: Select all   Expand viewCollapse view
# sw_vers -productVersion
10.14.6


Any more ideas what I could do to get the extensions approved? Any more logs I could provide?

Thanks!


EDIT: So I have actually been able to fix this right now. I cannot fully recall which error
Code: Select all   Expand viewCollapse view
# sudo kextutil -t VBoxDrv.kext

produced, but it had something to do with a staging error and a temporary directory. I have elaborated on this more in my post below.

In the end I could fix it by running the following from the rescue environment after unlocking "Macintosh HD"
Code: Select all   Expand viewCollapse view
# chflags restricted /Volumes/Macintosh\ HD/private/var/db/KernelExtensionManagement
# chflags restricted /Volumes/Macintosh\ HD/private/var/db/KernelExtensionManagement/Staging


Afterwards rebooted and verified:
Code: Select all   Expand viewCollapse view
# ls -ldO /Volumes/Macintosh\ HD/private/var/db/KernelExtensionManagement
drwxr-xr-x@ 3 root  wheel  restricted 96 30 Sep 12:16 /Volumes/Macintosh HD/private/var/db/KernelExtensionManagement
# ls -ldO /Volumes/Macintosh\ HD/private/var/db/KernelExtensionManagement/Staging
drwxr-xr-x  2 root  wheel  restricted 64  4 Nov 21:57 /Volumes/Macintosh HD/private/var/db/KernelExtensionManagement/Staging


Extensions can now be loaded again!
Last edited by TheQL on 6. Nov 2020, 19:57, edited 5 times in total.
TheQL
 
Posts: 15
Joined: 4. Nov 2020, 22:27

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby logullo » 4. Nov 2020, 23:15

I’m having exactly the same issues with nearly the same setup (macOS 10.14.6; attempting upgrade from 6.1.x to 6.1.16).
Had high hopes that 'spctl kext-consent add VB5E2TV963’ in rescue mode would do the trick… but no.
@TheQL: you’re not alone. :-/
logullo
 
Posts: 5
Joined: 26. Jan 2011, 01:53
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Oracle Linux; Windows 10

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby TheQL » 4. Nov 2020, 23:17

logullo wrote:I’m having exactly the same issues with nearly the same setup (macOS 10.14.6; attempting upgrade from 6.1.x to 6.1.16).
Had high hopes that 'spctl kext-consent add VB5E2TV963’ in rescue mode would do the trick… but no.
@TheQL: you’re not alone. :-/


Maybe check my findings from the edit from above, it actually helped me!

You could first check if you have similar output from this:
Code: Select all   Expand viewCollapse view
# log show --start "$(date -v-4H +'%Y-%m-%d %H:%M:%S')" --style syslog --info --predicate 'process == "kextd" || eventMessage contains "Sandbox: kextd"'
[...]
2020-11-04 21:23:05.693230+0100  localhost kextd[54]: (IOKit) [com.apple.kext:kextlog] Error making temporary directory: 1
2020-11-04 21:23:05.693281+0100  localhost kextd[54]: (IOKit) [com.apple.kext:kextlog] Memory allocation failure.
2020-11-04 21:23:05.693310+0100  localhost kextd[54]: (IOKit) [com.apple.kext:kextlog] Unable to stage kext (/Library/Application
 Support/VirtualBox/VBoxDrv.kext) to secure location.
2020-11-04 21:23:05.700355+0100  localhost sandboxd[115]: [com.apple.sandbox.reporting:violation] Sandbox: kextd(54) System Policy: deny(1) file-write-create /private/var/db/KernelExtensionManagement/Staging/tmp.JvLoly
[...]
2020-11-04 21:23:05.715263+0100  localhost kextd[54]: (IOKit) [com.apple.kext:kextlog] Error making temporary directory: 1
2020-11-04 21:23:05.715311+0100  localhost kextd[54]: (IOKit) [com.apple.kext:kextlog] Memory allocation failure.
2020-11-04 21:23:05.715341+0100  localhost kextd[54]: (IOKit) [com.apple.kext:kextlog] Unable to stage kext (/Library/Application Support/VirtualBox/VBoxDrv.kext) to secure location.
2020-11-04 21:23:05.715365+0100  localhost kextd[54]: (IOKit) [com.apple.kext:kextlog] org.virtualbox.kext.VBoxDrv was unable to stage properly; failing.
[...]
TheQL
 
Posts: 15
Joined: 4. Nov 2020, 22:27

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby logullo » 5. Nov 2020, 17:22

TheQL wrote:You could first check if you have similar output from this:
Code: Select all   Expand viewCollapse view
# log show --start "$(date -v-4H +'%Y-%m-%d %H:%M:%S')" --style syslog --info --predicate 'process == "kextd" || eventMessage contains "Sandbox: kextd"'
[...]
2020-11-04 21:23:05.693230+0100  localhost kextd[54]: (IOKit) [com.apple.kext:kextlog] Error making temporary directory: 1
2020-11-04 21:23:05.693281+0100  localhost kextd[54]: (IOKit) [com.apple.kext:kextlog] Memory allocation failure.
2020-11-04 21:23:05.693310+0100  localhost kextd[54]: (IOKit) [com.apple.kext:kextlog] Unable to stage kext (/Library/Application
 Support/VirtualBox/VBoxDrv.kext) to secure location.
2020-11-04 21:23:05.700355+0100  localhost sandboxd[115]: [com.apple.sandbox.reporting:violation] Sandbox: kextd(54) System Policy: deny(1) file-write-create /private/var/db/KernelExtensionManagement/Staging/tmp.JvLoly


Yes -- I’ve got the same (well, similar) in my log:

Code: Select all   Expand viewCollapse view
2020-11-04 12:38:22.526137-0600  localhost kextd[71]: (IOKit) [com.apple.kext:kextlog] Error making temporary directory: 1
2020-11-04 12:38:22.526147-0600  localhost kextd[71]: (IOKit) [com.apple.kext:kextlog] Memory allocation failure.
2020-11-04 12:38:22.526156-0600  localhost kextd[71]: (IOKit) [com.apple.kext:kextlog] Unable to stage kext (/Library/Application Support/VirtualBox/VBoxDrv.kext) to secure location.
2020-11-04 12:38:22.555106-0600  localhost kernel[0]: (Sandbox) Sandbox: kextd(71) System Policy: deny(1) file-write-create /private/var/db/KernelExtensionManagement/Staging/tmp.M7ZPJd


And I should add that I went into recovery mode and added the identifier; it’s showing as allowed to load:

Code: Select all   Expand viewCollapse view
Kitchen-iMac:Documents jeff$ spctl kext-consent list
Allowed Team Identifiers:
VB5E2TV963
logullo
 
Posts: 5
Joined: 26. Jan 2011, 01:53
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Oracle Linux; Windows 10

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby TheQL » 6. Nov 2020, 01:41

In the end it was the chflags that worked for me, but I thought about if deleting the entire folder could also help, as it isn't there on another Mac I own.
The consent did nothing. :/
TheQL
 
Posts: 15
Joined: 4. Nov 2020, 22:27

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby mfurlanetto » 6. Nov 2020, 10:41

Thanks TheQL,
this solved my problem too.

TheQL wrote:In the end I could fix it by running the following from the rescue environment after unlocking "Macintosh HD"
Code: Select all   Expand viewCollapse view
# chflags restricted /Volumes/Macintosh\ HD/private/var/db/KernelExtensionManagement
# chflags restricted /Volumes/Macintosh\ HD/private/var/db/KernelExtensionManagement/Staging


I owe you a beer :D
mfurlanetto
 
Posts: 2
Joined: 28. Oct 2020, 12:26

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby TheQL » 6. Nov 2020, 15:04

mfurlanetto wrote:Thanks TheQL,
this solved my problem too.

TheQL wrote:In the end I could fix it by running the following from the rescue environment after unlocking "Macintosh HD"
Code: Select all   Expand viewCollapse view
# chflags restricted /Volumes/Macintosh\ HD/private/var/db/KernelExtensionManagement
# chflags restricted /Volumes/Macintosh\ HD/private/var/db/KernelExtensionManagement/Staging


I owe you a beer :D



Glad to hear that, you're welcome! ;)
TheQL
 
Posts: 15
Joined: 4. Nov 2020, 22:27

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby logullo » 6. Nov 2020, 18:48

Okay, interesting that on this Mac the ’Staging’ directory is restricted, but its parent, ‘KernelExtensionManagement’ is not:

Code: Select all   Expand viewCollapse view
$ ls -ldO /Volumes/Macintosh\ HD/private/var/db/KernelExtensionManagement
drwxr-xr-x@ 3 root  wheel  - 96 Jun  5 13:01 /Volumes/Macintosh HD/private/var/db/KernelExtensionManagement

$ ls -ldO /Volumes/Macintosh\ HD/private/var/db/KernelExtensionManagement/Staging
drwxr-xr-x  2 root  wheel  restricted 64 Oct  1 18:17 /Volumes/Macintosh HD/private/var/db/KernelExtensionManagement/Staging


I’ll give it a go and see what happens.
logullo
 
Posts: 5
Joined: 26. Jan 2011, 01:53
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Oracle Linux; Windows 10

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby TheQL » 6. Nov 2020, 19:55

It should then. I think checking for the rootless attribute was the wrong approach from me, your "ls -ld0" is checking for the restricted flag. Edited that above to avoid confusion.
TheQL
 
Posts: 15
Joined: 4. Nov 2020, 22:27

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby ptram » 14. Nov 2020, 00:01

ptram wrote:I could solve my issue with installation failing, by reinstalling High Sierra.
After a backup, I rebooted while keeping Cmd-R pressed. I then chose to reinstall the OS.
When done, the VB installer worked fine. Reinstalling probably reset some OS file permission.


I'm quite shocked, but I'm again with VB not working, due to kernel permission. After using VS 6.1.15 with not problems, I decided to update to v6.1.16 when prompted.

Installation failed, again for kernel extension not loading. No options appeared in the Privacy preferences.

I guess I have to reinstall the OS again. I hope to avoid the long days spent to solve this issue earlier.

Paolo
ptram
 
Posts: 75
Joined: 10. Dec 2008, 18:58

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby logullo » 14. Nov 2020, 00:10

1) Upgraded to Catalina
2) Installed VBox
3) Profit!
logullo
 
Posts: 5
Joined: 26. Jan 2011, 01:53
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Oracle Linux; Windows 10

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby ptram » 14. Nov 2020, 00:18

logullo wrote:1) Upgraded to Catalina


I can't do until I've set up some virtual machines under High Sierra.

But then, are these issues solved under Catalina?

Paolo
ptram
 
Posts: 75
Joined: 10. Dec 2008, 18:58

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby ptram » 14. Nov 2020, 02:54

Reinstalled High Sierra again, and then could install VB 6.1.16.
Something is happening to the defaults of the system. Not having this type of problem with other software, I suspect it is something right in VB.

Paolo
ptram
 
Posts: 75
Joined: 10. Dec 2008, 18:58

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby TheQL » 14. Nov 2020, 15:13

Would have been interesting to see if the permissions for the staging directory (see my posts above) were messed up on High Sierra as well. Of course you could have had an entirely different issue. Sometimes I miss the good old "fix permissions" feature of Disk Utility.
TheQL
 
Posts: 15
Joined: 4. Nov 2020, 22:27

Re: Installation fails on 10.13.x, 10.14.x (rc=-1908)

Postby xedx » 13. Dec 2020, 07:26

TheQL wrote:
In the end I could fix it by running the following from the rescue environment after unlocking "Macintosh HD"
Code: Select all   Expand viewCollapse view
# chflags restricted /Volumes/Macintosh\ HD/private/var/db/KernelExtensionManagement
# chflags restricted /Volumes/Macintosh\ HD/private/var/db/KernelExtensionManagement/Staging



This Fix working for me as well (HS upgrade to Mojave) + fixed vmware fusion (installed out of desperation and didn't show notification nor security confirmation request).
After this fix vmware fusion asked for permission to load kext immediately after run...
Now I'm running VirtualBox 6.1.14 fine...

Many thanks TheQL!
xedx
 
Posts: 1
Joined: 13. Dec 2020, 07:10

PreviousNext

Return to VirtualBox on Mac OS X Hosts

Who is online

Users browsing this forum: No registered users and 13 guests