How to Install VirtualBox in MacOS Mojave if Installation Fails or Shows Kernel Driver Errors

Dec 31, 2018 - 37 Comments

Install and run Virtualbox in MacOS Mojave

If you have attempted to install VirtualBox in macOS Mojave you may have noticed the installation sometimes fails with a generic “The installation failed” error message. Then, when trying to run VirtualBox you may experience another error saying “Kernel driver not installed” and VirtualBox fails to function. We’ll cover two different resolutions to the installation/running VirtualBox problem, one involving a Gatekeeper bypass, and the other using a Gatekeeper exception (for macOS 10.14.5 or later).

The reason for the installation failure and the inability for the kernel module to load successfully is due to security restrictions in MacOS Mojave, and thus to be able to successfully install VirtualBox and run the app you will need to make a relatively simple bypass of those aforementioned security restrictions (alternatively, you can also disable Gatekeeper completely but that is generally not recommended). By the way, while this article is obviously focused on VirtualBox you will find this same general process is necessary for installing other apps that include kernel extensions.

How to Successfully Install VirtualBox in MacOS Mojave (if it fails)

Assuming you have already downloaded VirtualBox onto the Mac (it’s free to download here), here is how you can successfully install and run VirtualBox in MacOS Mojave:

  1. Run the VirtualBox installer as usual, you’ll eventually see the “Installation Failed” message
  2. VirtualBox install fails

  3. Quit out of the VirtualBox installer after it fails
  4. Now pull down the  Apple menu and open System Preferences
  5. Choose “Security & Privacy” and go to the ‘General’ tab within Security preference panel, then click the lock button and enter the administrator password
  6. At the bottom of the Security General section, look for the message stating “System software from developer ‘Oracle America, Inc’ was blocked from loading” and click the “Allow” button
  7. Allow the Oracle installer to run on Mac

  8. Relaunch the VirtualBox installer and proceed through the installation as usual, it should now succeed as expected
  9. Virtualbox successful install

Go ahead and run VirtualBox as usual, it should load fine without any further kernel driver error messages. If you are still experiencing issues, refer to the next step, which is a different procedure required in later versions of MacOS.

Can’t Install / Run VirtualBox in MacOS 10.14.5 or Later? Try This

If you’re attempting to install VirtualBox on a machine running macOS Mojave 10.14.5 or later you may run into a notarization requirement for apps outside the App Store. To get around that (for now until VirtualBox becomes notarized) try the following:

  1. Restart the Mac into Recovery Mode by rebooting and holding down COMMAND + R keys concurrently
  2. At the “Utilities” screen, pull down the ‘Utilities’ menu and choose “Terminal” to launch terminal from Recovery Mode
  3. Enter the following command:
  4. spctl kext-consent add VB5E2TV963

  5. Hit Return, then restart the Mac with a normal boot as usual

This solution was posted in our comments below via VirtualBox forums and appears to work for many users running macOS 10.14.5 or newer (thanks to the various commenters to left this solution!). Apparently “VB5E2TV963” is the code for Oracle, and entering this Gatekeeper exception into the command line will allow VirtualBox to install in the newest versions of MacOS with notarization requirements. This will likely only be a temporary necessity until VirtualBox eventually becomes notarized through the process outlined by Apple.

Now try installing and/or running VirtualBox, it should work fine within the latest versions of MacOS system software.

In the screenshot below you see VirtualBox running in MacOS 10.14.x with BeOS / Haiku OS.

VirtualBox running BeOS Haiku OS in MacOS

If you’re an advanced user (and you probably are if you’re running virtualization software and virtual machines in the first place) then you might be interested in allowing apps to be installed from anywhere in MacOS by adjusting Gatekeeper as instructed here.

For some quick background, MacOS Mojave 10.14.5 and later versions of MacOS require notarization to be able to install some apps outside the App Store. Additionally, GateKeeper is the Mac OS security mechanism that aims to prevent untrusted apps from being run or installed on the Mac. By default, the more modern versions of MacOS have particularly strict Gatekeeper settings and will throw error messages stating that an app can’t be opened because it is from an unidentified developer and so forth, though simply right-clicking and choosing “Open” on most apps allows you to bypass that mechanism, and you can also bypass that from the Security preference panel too. The newest macOS releases, like Mojave, take this further and also will require app notarization from the developer (or a manual bypass as instructed in the latter tutorial), or a Gatekeeper bypass for installing certain software that bundles kernel extensions as well, such as VirtualBox. If you’re not thrilled with those protective mechanisms to MacOS, you can always disable Gatekeeper completely and disable System Integrity Protection as well, though doing so is generally not recommended.


Related articles:

Posted by: Paul Horowitz in Mac OS, Tips & Tricks, Troubleshooting


» Comments RSS Feed

  1. Timothy says:

    Thx a lot !

  2. Lakshmi P says:

    This worked like a charm. thanks for the detailed instructions

  3. Jayasree Samansa says:

    Thanks. Working fine.

  4. what worked for me. says:

    I booted in recovery mode (apple key R), and reinstalled Mac OS. Then I was able to install virtual box and it works fine. problem solved. I’m running Mojave 10.14.6, virtual box 6.0.22.

    when installing virtual box, I clicked on customize and chose not to install MacFuse or the command line options… MacFuse was already on my system. (not sure this matters but wanted to mention it).

  5. macgeek says:

    not working for me. which is odd the program was installed and worked fine until I tried to update it. now it wont install or run

  6. not working says:

    not working for me. always worked fine until now. now i cant even install the program. makes no sense.

  7. not working for me. says:

    not working for me. VB 6.0.20 was working fine til I tried upgrading to 6.0.22. now I cant get it to work or install it. never had any problems installing or running it until I tried updating it.

  8. Romual Z says:

    thanks is very important, my problem is solved

  9. Vikki says:


    If you don’t want to deal with modifying the security settings or boot into Recovery Mode, another way to workaround the notarization issue is to install the older version of VirtualBox. I installed 5.2.26 version which was built in January, 2019 on 10.14.6 successfully without any manual step. Notarization is only enforced on applications that were built after March (or April, I can’t remember the exact month).

    So unless you really need the new features provided by the later versions of VirtualBox, using the earlier version is a quick shortcut.

    Hope this helps!

  10. micky says:

    Weldone…. Bingo… It works perfectly well

  11. edimo says:

    Thank you, it works!

  12. Jonathan says:

    Very useful, thanks. A minor issue: ~/Desktop is often as not an iCloud share these days, so we end up pushing 8+ GB to the cloud unless we act fast.

  13. phinehas says:

    Thanks Works great!!!!!

  14. Francisco says:

    Wow, this is it. I never gave attention to that error and didn’t relate it to the error.

    It was the reason my installation was failing to work!

    Thanks a lot!

  15. David says:

    Thanks !!!!!!!!!!!!!!!!!!!!!!

  16. Jerry says:

    Thanks for the article – this helped me get VirtualBox installed on macOS Mojave!

  17. Victor says:

    Getting tired of Apple’s s**t… Thank you for this quick fix. Never would have occurred to me to check the security preferences as there is 0 user feedback.

  18. anonymous gho5t says:

    Thanks !!!! I don’t ever leave comments but thanks !!

  19. Huiyang Shan says:

    Very helpful, resolved the problem.
    Thanks for great sharing~~!

  20. Terry Henderson says:

    Just Tried The 6.0.8 Install On MacOS 10.14.5 ! It Did Not Throw
    Up The Installation Failed Screen !!! It Actually Installed Perfectly.
    05/30/2019 !!!!! Seems They Fixed The Installer !!!!

  21. Joe says:

    Excelente. Me ayudo con la situación. Gracias!!

  22. Jay says:

    For those running Mojave (10.14.5) attempting to install VirtualBox 6.0.8, the installer is failing due to Mac OS X’s new kernel extension notarization requirement. To install VirtualBox, do this:

    – Reboot into recovery console (hold Cmd+R at boot)
    – Open a terminal window
    – Enter this: spctl kext-consent add VB5E2TV963
    – Reboot
    – Run the VirtualBox installer again and it should work

  23. Leish says:

    See the post here:

    booting into recovery mode and running this terminal command:
    spctl kext-consent add VB5E2TV963

    Then reboot. May have to do it twice.

  24. kimjay says:

    What is the Allow button is not there? I’ve uninstalled Virtualbox twice, reinstalled and the Allow button won’t show up. I’ve clicked Allow before, but the VB update was blocked and there’s no Allow button.

    • TheIcemanCometh says:

      Same for me. I don’t get the entry on the Security and Privacy screen to allow me to override it. It’s just not there.

      • Paul says:

        Try right-clicking the VirtualBox installer application and selecting “Open” from there.

        Another option is to go to the Security preference panel and set Gatekeeper to allow all apps by disabling it, do this just temporarily while installing and launching VirtualBox for the first time. Done from Terminal as:

        sudo spctl --master-disable

        More info here:

        You can also manually add a Gatekeeper exception from the command line on the Mac, which might look something like this:

        spctl --add ~/Downloads/VirtualBoxInstaller.pkg

        More on that here:

        Hope that helps!

        • Iram Valle says:

          I tried everything, I disabled gatekeeper, and added exception on my installer which is VirtualBox-6.0.8-130520-OSX.dmg, I even restarted my Mac several times, I have selected the option Anywhere, under Allow apps downloaded from:, and uninstalled VirtualBox previously installed on this computer. At installing I choosing Customize and deselect FUSE and Command Line Utilities as recommended un another forums. I always get the same Installation Failed error and never get the Allow button for Oracle America Inc. very odd.

          • Leish says:

            See the post here:

            booting into recovery mode and running this terminal command:
            spctl kext-consent add VB5E2TV963

            Then reboot. May have to do it twice.

          • Arseny says:

            I have totally the same problem as Iram!

          • Harsh Modi says:

            I am having the same issue haven’t find any solution yet

          • pablo says:

            Try this:

            – Restart your mac in Recovery mode (cmd + R)

            – Open a Terminal and enter:

            spctl kext-consent add VB5E2TV963

            – Restart your mac.

            VB5E2TV963 is the code for Oracle.

            This solution was found on VirtualBox Oracle forums. It’s a new requirement since notarization is required with macOS 10.14.5 or later apparently. Perhaps this will apply to all new apps not from App Store? Where to find the codes for apps at that point… sounds frustrating.

  25. Fabian Gonzalez says:

    Thanks, was running into this problem last weekend and this helped me to solve it!

  26. Mike says:

    hey this was so helpful, I’ve been trying to properly install this software for over a week now. This was so easy and straight to the point, cheer!

  27. London says:

    Thanks! This was super helpful! Easy to follow and just what I needed. Keep up the good work!

  28. Jan says:

    Thanks, this was very helpful.

Leave a Reply


Shop on and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks


iPhone / iPad



Shop on Amazon to help support this site