Virtualbox fails to run.. kernel driver not loaded

Discussions related to using VirtualBox on Mac OS X hosts.
drgreen
Posts: 3
Joined: 10. Aug 2016, 21:06

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

Post by drgreen »

Thanks for such a prompt reply. Much appreciated. I will give that a try.
loukingjr
Volunteer
Posts: 8851
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

Post by loukingjr »

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.
drgreen
Posts: 3
Joined: 10. Aug 2016, 21:06

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

Post by drgreen »

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.
loukingjr
Volunteer
Posts: 8851
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

Post by loukingjr »

Welcome.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
dixita
Posts: 4
Joined: 1. Mar 2017, 09:41
Primary OS: PCLinuxOS
VBox Version: OSE Mandriva
Guest OSses: Linux
Contact:

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

Post by dixita »

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

!/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
ozan
Posts: 5
Joined: 10. Oct 2017, 13:30

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

Post by ozan »

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.
socratis
Site Moderator
Posts: 27330
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 fails to run.. kernel driver not loaded

Post by socratis »

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.
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.
ozan
Posts: 5
Joined: 10. Oct 2017, 13:30

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

Post by ozan »

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 ?
socratis
Site Moderator
Posts: 27330
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 fails to run.. kernel driver not loaded

Post by socratis »

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?
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.
ozan
Posts: 5
Joined: 10. Oct 2017, 13:30

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

Post by ozan »

dixita wrote:
aegirth wrote:

Code: Select all

!/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).
socratis
Site Moderator
Posts: 27330
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 fails to run.. kernel driver not loaded

Post by socratis »

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.
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.
ozan
Posts: 5
Joined: 10. Oct 2017, 13:30

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

Post by ozan »

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.
socratis
Site Moderator
Posts: 27330
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 fails to run.. kernel driver not loaded

Post by socratis »

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.
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.
ozan
Posts: 5
Joined: 10. Oct 2017, 13:30

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

Post by ozan »

5.1.28 works perfectly fine.
socratis
Site Moderator
Posts: 27330
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 fails to run.. kernel driver not loaded

Post by socratis »

There you go! Thanks for the feedback...
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