VirtualBox error NS_ERROR_FAILURE (0x80004005) on macOS

Problem

After updating my MacBook macOS Big Sur to version 11.6.5, I was getting the below NS_ERROR_FAILURE error while trying to launch the Windows virtual machine on VirtualBox 6.1. I was unable to launch the virtual machine.

Errors

Failed to open a session for the virtual machine MacWin2.

The virtual machine ‘MacWin2’ has terminated unexpectedly during startup with exit code 1 (0x1).

Result Code: NS_ERROR_FAILURE (0x80004005)

Component: MachineWrap

Interface: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}

VirtualBox Error NS_ERROR_FAILURE (0x80004005) On MacOS

At the same time another error window appeared with the below error:

Kernel driver not installed (rc=-1908)

Make sure the kernel module has been loaded successfully.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) – The support driver is not installed. On linux, open returned ENOENT.

Kernel driver not installed (rc=-1908) error

Solution 1: (Restart The Mac)

Before thinking too much, make sure you have restarted your Mac after completing the OS update.

In my case, after updating the OS, even before restarting my Mac, I tried to launch the virtual machine and got the errors. After restarting the Mac, the errors vanished. So, before trying anything dramatic, try restarting the Mac. If you are still getting the error, then try the below solutions one by one.

Solution 2: (Re-enable SIP)

The next thing to do is to check and make sure SIP (System Integrity Protection) is enabled. To check it, run this command in the terminal.

csrutil status
SIP is enabled in MacOS

System Integrity Protection should be in enabled state. If it is in disabled state for some reason, then enable it by following these steps:

  1. Restart the Mac by holding the Command and R keys together.
  2. Leave the keys when the apple logo appears.
  3. In the recovery mode, go to the Utilities menu.
  4. Select Terminal.
  5. In the terminal window, run the below command to enable SIP and reboot the Mac.
csrutil enable && reboot
  1. Allow the mack to launch in normal mode.
  2. Launch terminal and run the command csrutil status and make sure SIS is enabled.

Solution 3: (Access Device Permission)

  1. Quit VirtualBox.
  2. In the Mac, launch the System Preferences.
  3. Go to Security & Privacy.
  4. Go to the Privacy tab.
  5. Unlock the privacy screen to make changes by pressing the lock icon at the bottom left of the screen and provide your authentication.
  6. From the left panel, go through the permissions Accessibility, Input Monitoring, Full Disk Access, Files and Folders and make sure VirtualBox.app is listed under the allow list (right panel) and the checkbox is selected. If not then add it to the list using the + button and select the check boxes.
  7. Launch VirtualBox and the virtual machine.
Give access permissions to VirtualBox.app

If you are still getting the NS_ERROR_FAILURE (0x80004005) error, then try the below solution.

Solution 4: (Allow identified developer in Security & Privacy)

Usually this solution is needed when you get errors after installing VirtualBox. As we are discussing the errors obtained after updating macOS, this solution may be irrelevant. Still I’m adding this solution here, just to check the settings before moving to the next solution.

  1. Quit VirtualBox.
  2. Launch the System Preferences.
  3. Go to Security & Privacy >> General tab.
  4. In the General tab, Unlock the security and privacy screen to make changes by clicking on the lock icon at the bottom of the screen and provide your authentication.
  5. Under the Allow apps downloaded from section, make sure the App Store and identified developers option is selected.
  6. Keep the System Preferences screen open and launch the virtual box and then the virtual machine. If the errors appear again, check the System Preferences >> Security & Privacy >> General tab and see if there is a warning like System software from developer “Oracle America, Inc.” was blocked from loading along with an Allow button that appears below the App Store and identified developers option. If so, press the Allow button.
  7. Quit the VirtualBox and launch it again.

Solution 5: (Update VirtualBox)

If the above solution were not fixing the problem, then see if there is any update available for the VirtualBox and install the update if there is any. To update the VirtualBox to its latest version follow these steps:

  1. Launch VirtualBox.
  2. From the menu select VirtualBox >> Check for updates…
  3. A small screen will popup and check for any update.
  4. If there is any update available, another window will popup and display the available update and the link of the dmg file.
  5. Download the dmg and follow the installation process.
  6. Once installed, perform the steps listed in Solution 4 above.
Update virtual box to its latest version

Solution 6: (Re-install VirtualBox)

If none of the above solutions are not fixing the NS_ERROR_FAILURE (0x80004005) error, then uninstall the VirtualBox and re-install it again.

Uninstalling VirtualBox

  1. To uninstall the VirtualBox, download the latest version from https://www.virtualbox.org/wiki/Downloads. Open the installation package. In the installation screen, you can see the uninstallation package VistualBox_Uninstall.tool at the bottom right corner.
  2. Right click VistualBox_Uninstall.tool and select Open with >> Terminal.
  3. In the terminal window, the uninstallation scripts will be opened and executed. Finally displays the list of VirtualBox programs installed in the Mac.
  4. Type Yes to confirm the installation process.
VirtualBox installation window
VirtualBox uninstallation script. Fix for NS_ERROR_FAILURE (0x80004005)

Clear existing permissions

  1. Restart the Mac in recovery mode by holding the Command and R keys together.
  2. Leave the keys when the apple logo appears.
  3. In the recovery mode, go to the Utilities menu.
  4. Select Terminal.
  5. In the terminal window, run the below command to clear all the existing permissions and then reboot the Mac.
csrutil clear

Instal VirtualBox

Finally install the fresh copy of the VirtualBox using the dmg file downloaded earlier. After installation, if needed, perform the steps mentioned in Solution 4 and then Solution 3 above.

Reference

Related Topics


Leave your thoughts...

This site uses Akismet to reduce spam. Learn how your comment data is processed.