While trying to launch VirtualBox, people are reporting that they are confronting the NS_ERROR_FAILURE error. However, the error is only common to Linux and macOS users, so if you are using Windows, probably you won’t have this issue. Moreover, people have also reported that the error also occurs while trying to update the system.
In general, a VirtualBox is a free and open-source hypervisor, which helps you to run different OS on the host system. Whether you are using a Linux, Window, or macOS, VirtualBox is available for all the major platforms, including Free-BSD and Solaris.
VirtualBox comes with plenty of features like snapshots, shared folders, special drivers and utilities, and much more. However, in this article, we are not gonna talk about what VirtualBox is and what it can do. But we will discuss a common error that people using VirtualBox is reporting. Also, we will talk about its cause and how to fix it.
VirtualBox NS_ERROR_FAILURE Error – Potential Causes
Till now, we have talked about how the error occurs and when it shows up. Clearly, we wanna fix the error, but to fix it, we must at least know some possible causes of it. Therefore, here we will discuss a few possible causes of the NS_ERROR_FAILURE error in VirtualBox.
- If you are using VirtualBox for a while, you might be familiar with the Saved State feature of VirtualBox. Whenever you shut down an OS in VM, you can save the current state of that OS. So next tie when you open it, it remains the same. It is very possible that the cause of the NS_ERROR_FAILURE error is because you have saved a state of an OS. Therefore, to fix it, you must remove the VM.
- Corrupted installation files can also be the cause of the NS_ERROR_FAILURE error, we are not sure how the files get damaged, but it’s not impossible. Therefore, to fix such an issue, you must reinstall VirtualBox.
- Using a third-party application like Duet Display to increase the numbers of displays, it can be the cause for the NS_ERROR_FAILURE.
How to Fix VirtualBox Error NS_ERROR_FAILURE Error
Solution 1: Discarding Saved State
As mentioned earlier, the saved state can be the cause of the error that occurs in the VirtualBox. To fix it, we have to discard the saved state from the VM. Follow the steps mentioned below to do so.
Step 1) Launch the VirtualBox on your Mac or Linux, click and select the Virtual Machine that is in a saved state. Distinguishing saved VM is easy, as the VM will be labelled as Saved under its name.
Step 2) After you have selected the VM, you can either click on the Discard button (arrow down icon) from the menu bar to remove the saved state. OR you can also right-click on the VM and select Discard Saved State.
Solution 2: Uninstalling Duet Display or any Alternative to it
The advantage of using multiple displays can cause conflict with the Virtual Machine VM’s and cause the NS_ERROR_FAILURE. Thus, you must uninstall any application like Duet Displays on your Mac and Linux to resolve the issue.
Step 1) Firstly, launch the Duet Display or alternative application to it, then you would be able to see the logo of it on your Panel.
Step 2) Click on the application logo and then click on the Settings icon in the bottom right.
Step 3) From the sub-menu, select the Uninstall Duet option and then just follow the prompts, confirm it and remove Duet Display from your System, after that, you shouldn’t face any error in VirtualBox.
Solution 3: Reinstalling VirtualBox
If the corrupted files are the main source of the issue, then reinstalling VirtualBox is your best bet. However, if you are curious about how the files get corrupt, then it is due to a recent system update o VirtualBox update, etc.
Step 1) If you are on Mac, then firstly, you should download the latest VirtualBox.dmg file from the official VirtualBox website.
Step 2) Once you have downloaded the file, then in your Mac, mount the VirtualBox.dmg file, using the Finder go to the installer, and click open on the VirtualBox_Uninstall tool file.
Step 3) The file will be launched in the terminal and will ask you whether you want to continue to uninstall Virtual Box, type Yes and hit enter to uninstall Virtual Box.
If you are using a Linux system, just open up the terminal and type sudo apt-get remove VirtualBox, press Enter, type y when prompt, an complete the uninstallation of the VirtualBox.
Step 4) In Mac, go to the Download file and install the VirtualBox software, allow access to the virtual box in Security and Policy settings window. This will prevent any error during installation. However, on Linux to install VirtualBox, just type the command sudo apt-get install virtualbox and press enter. Type y if prompted and wait some time for the system to download and install virtual box.
Solution 4: Updating VirtualBox Host Modules Packages
This method is only exclusive to Linux users if you are using an outdated VirtualBox host Modules packages. Then you must update the VirtualBox Host Modules to the latest version.
Step 1) Firstly, press the Ctrl+Alt+T keys on your keyboard to open up the Terminal, then if you are using an ubuntu-based Linux distro, execute the following command.
sudo apt-get update && apt upgrade
Alternatively, you can try the sudo apt-get dist-upgrade command too, this will update the entire distribution. However, if you are using Arch-based distro, type the following command and execute.
sudo pacman -Syyu
Step 2) After you have successfully updated your Linux distribution, then you will have to uninstall the old kernel. Also, you will have to recompile the VirtualBox kernel modules. Therefore type the following command and press enter on your keyboard. After that, it should fix the NS_ERROR_FAILURE issue.
sudo /sbin/rcvboxdrv setup
If you are facing the NS_ERROR_FAILURE while trying to launch a VM in VirtualBox, then firstly, you must discard the saved state. Go to the VM that is having the issue, select it can click on the Discard button from the top menu of the Virtual machine Window.
You must uninstall applications like Duet Displays, which helps to increase the number of displays because such an application might be in conflict with VM and cause te issue. If that doesn’t work, either you just reinstall the VirtualBox, the steps are mentioned above in the steps.
Lastly, you can try to fix the issue by updating the VirtualBox host modules package. You must uninstall the old kernel and install the new Virtualbox kernel modules.