Virtualbox fails to run.. kernel driver not loaded

Discussions related to using VirtualBox on Mac OS X hosts.

Re: Virtualbox fails to run.. kernel driver not loaded

Postby drgreen » 10. Aug 2016, 21:38

Thanks for such a prompt reply. Much appreciated. I will give that a try.
drgreen
 
Posts: 3
Joined: 10. Aug 2016, 21:06

Re: Virtualbox fails to run.. kernel driver not loaded

Postby loukingjr » 10. Aug 2016, 21:53

Welcome. Try VB 5.0.26
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
loukingjr
Volunteer
 
Posts: 8807
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Virtualbox fails to run.. kernel driver not loaded

Postby drgreen » 10. Aug 2016, 22:13

Thanks. Yes - that worked and I am back into XP again. A bit of a relief.... as I used the Windows partition quite a bit..... until the upgrade to El Capitan......Once again - much appreciated.
drgreen
 
Posts: 3
Joined: 10. Aug 2016, 21:06

Re: Virtualbox fails to run.. kernel driver not loaded

Postby loukingjr » 10. Aug 2016, 22:20

Welcome.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
loukingjr
Volunteer
 
Posts: 8807
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: Virtualbox fails to run.. kernel driver not loaded

Postby dixita » 8. Apr 2017, 13:56

aegirth wrote:for Google's sake, thought I'd add here some code I found on Github that fixes this for me. It's a shell script that unloads all the Virtualbox kernel extensions and reloads them.

Code: Select all   Expand viewCollapse view
!/bin/bash

unload() {
        kextstat | grep "org.virtualbox.kext.VBoxUSB" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxUSB
        kextstat | grep "org.virtualbox.kext.VBoxNetFlt" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetFlt
        kextstat | grep "org.virtualbox.kext.VBoxNetAdp" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetAdp
        kextstat | grep "org.virtualbox.kext.VBoxDrv" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxDrv
}

load() {
        sudo kextload /Library/Extensions/VBoxDrv.kext -r /Library/Extensions/
        sudo kextload /Library/Extensions/VBoxNetFlt.kext -r /Library/Extensions/
        sudo kextload /Library/Extensions/VBoxNetAdp.kext -r /Library/Extensions/
        sudo kextload /Library/Extensions/VBoxUSB.kext -r /Library/Extensions/
}

case "$1" in
        unload|remove)
                unload
                ;;
        load)
                load
                ;;
        *|reload)
                unload
                load
                ;;
esac


If you have this problem, save this to a file somewhere on your hard drive, chmod -x it to make it executable, and then run it.


HI.. thanx a lot.. congrats for your efforts.
It really worked perfectly.. Bravo for this
dixita
 
Posts: 5
Joined: 1. Mar 2017, 09:41
Primary OS: PCLinuxOS
VBox Version: OSE Mandriva
Guest OSses: Linux

Re: Virtualbox fails to run.. kernel driver not loaded

Postby ozan » 10. Oct 2017, 13:52

Hi,

I have been facing this problem since I upgraded my mac to Sierra version. When I run the shell script, it cannot upload the kernel extentions and gives me the following error:

/Library/Extensions/VBoxDrv.kext failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
/Library/Extensions/VBoxNetFlt.kext failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
/Library/Extensions/VBoxNetAdp.kext failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
/Library/Extensions/VBoxUSB.kext failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).

Do you have any idea that may solve this problem ? Otherwise I will have to uninstall/reinstall the VM :(

Thanks in advance.
ozan
 
Posts: 5
Joined: 10. Oct 2017, 13:30

Re: Virtualbox fails to run.. kernel driver not loaded

Postby socratis » 10. Oct 2017, 14:11

ozan wrote:Otherwise I will have to uninstall/reinstall the VM

Slight correction; you will have to uninstall/reinstall VirtualBox, not the VM. You can uninstall/reinstall VirtualBox as many times as you like (I do it at least 2-3 times per day) and your VMs will be untouched. It's like if you're installing a different version of LibreOffice; your documents do not get destroyed, your spreadsheets are all happy. Same with every other program, it doesn't delete/destroy your documents. The VMs are "documents" to the VirtualBox application.

BTW, you never mentioned your current VirtualBox version, it might be too old for Sierra. So, please go ahead and download the latest and greatest VirtualBox (5.1.28 as of this writing), uninstall the one that you currently have installed, and install the latest one.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12679
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Virtualbox fails to run.. kernel driver not loaded

Postby ozan » 10. Oct 2017, 15:22

Thanks! You are right, I'm just not familiar with the terminology here :) I use virtualbox version 4.3.12. I know it's a bit old (and I will definitely update it) but shouldn't this shell script be able to reinstall the kernels ?
ozan
 
Posts: 5
Joined: 10. Oct 2017, 13:30

Re: Virtualbox fails to run.. kernel driver not loaded

Postby socratis » 10. Oct 2017, 16:51

Yes, 4.3.12 is way, way too old to be able to run correctly on OSX 10.12. I'm not quite sure what you mean by "shouldn't this shell script be able to reinstall the kernels ?". What script are you referring to and which kernels are you referring to?
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12679
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Virtualbox fails to run.. kernel driver not loaded

Postby ozan » 10. Oct 2017, 18:35

dixita wrote:
aegirth wrote:
Code: Select all   Expand viewCollapse view
!/bin/bash

unload() {
        kextstat | grep "org.virtualbox.kext.VBoxUSB" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxUSB
        kextstat | grep "org.virtualbox.kext.VBoxNetFlt" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetFlt
        kextstat | grep "org.virtualbox.kext.VBoxNetAdp" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetAdp
        kextstat | grep "org.virtualbox.kext.VBoxDrv" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxDrv
}

load() {
        sudo kextload /Library/Extensions/VBoxDrv.kext -r /Library/Extensions/
        sudo kextload /Library/Extensions/VBoxNetFlt.kext -r /Library/Extensions/
        sudo kextload /Library/Extensions/VBoxNetAdp.kext -r /Library/Extensions/
        sudo kextload /Library/Extensions/VBoxUSB.kext -r /Library/Extensions/
}

case "$1" in
        unload|remove)
                unload
                ;;
        load)
                load
                ;;
        *|reload)
                unload
                load
                ;;
esac



I tried to run this script and obtained the following errors:

/Library/Extensions/VBoxDrv.kext failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
/Library/Extensions/VBoxNetFlt.kext failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
/Library/Extensions/VBoxNetAdp.kext failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
/Library/Extensions/VBoxUSB.kext failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
ozan
 
Posts: 5
Joined: 10. Oct 2017, 13:30

Re: Virtualbox fails to run.. kernel driver not loaded

Postby socratis » 10. Oct 2017, 19:08

ozan
Forget the script. Upgrade VirtualBox. If it doesn't work with 5.1.28, then we can talk about it. I told you that the script is not required, it was a temporary, cheap workaround for a very specific case, which most probably has already been resolved. The solution was posted in 2012.

Frankly I'm borderline to locking this thread as "Outdated", "Invalid" and "WorksForMe". Do NOT follow advice from 2012, follow today's advice.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12679
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Virtualbox fails to run.. kernel driver not loaded

Postby ozan » 10. Oct 2017, 22:12

I already mentioned that I will upgrade. I was just curious about how things work. By the way, the reason I tried to use the script is that I am already using an old release, and most people were satisfied by this advice.

Thank you for your kind response.

Cheers.
ozan
 
Posts: 5
Joined: 10. Oct 2017, 13:30

Re: Virtualbox fails to run.. kernel driver not loaded

Postby socratis » 10. Oct 2017, 22:21

The scripts don't work because the VirtualBox version is too old. That's it. If you don't upgrade, you're going to keep on failing. What the scripts do is what your system is doing during startup. Now, 5 years ago, and for unknown reasons the OP had a problem, which was never properly identified and/or fixed. The "workaround" re-initializes the kernel extensions, that's it. You would have had the same effect if you rebooted the computer.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12679
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Virtualbox fails to run.. kernel driver not loaded

Postby ozan » 10. Oct 2017, 23:10

5.1.28 works perfectly fine.
ozan
 
Posts: 5
Joined: 10. Oct 2017, 13:30

Re: Virtualbox fails to run.. kernel driver not loaded

Postby socratis » 10. Oct 2017, 23:12

There you go! Thanks for the feedback...
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 12679
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

PreviousNext

Return to VirtualBox on Mac OS X Hosts

Who is online

Users browsing this forum: No registered users and 19 guests