What is result code “E_FAIL (0x80004005)” and How to Fix this Issue

The E_FAIL (0x80004005) error on the Oracle VM VirtualBox prevents you from starting a Virtual Machine session. There are several types of these errors, and you’ll see different messages accompany the error code in separate cases.

So, naturally, there are various possible causes and corresponding fixes. Depending on the nature of your error, you can use the appropriate steps from the guide below.

How To Fix Result Code: E_FAIL (0x80004005)

Reasons for Result Code: E_FAIL (0x80004005)

Here are some of the probable reasons for Result Code: E_fail (0x80004005) error:

  • Missing Virtual Machine file.
  • Hypervisor interfering with VirtualBox.
  • Duplicate config values in the vbox file.
  • Bugs in VirtualBox builds.
  • Incompatibility with Operating System.
  • Missing VirtualBox driver.
  • Interference by third-party applications.
  • Bad DLL due to Graphics Driver.
  • Improper Network Adapter configuration.

First, restart your PC and access the VM where you encountered this error. If the error reoccurs, move on to the possible solutions below.

Result Code: E_FAIL (0x80004005) on Particular Virtual Machine

The most common case of this error occurs due to a missing virtual machine file. It usually happens when you force exit the VirtualBox.

This is because the VirtualBox stores all activities to a temporary file during its operation and renames it to the VM file during a normal shutdown.

You can fix this issue by manually renaming the file. Here’s how you can do so:

  1. Go to your Virtual Machine file location.
  2. In Windows, it is usually C:\Users\<username>\.VirtualBox\Machines\<virtualmachine>.
    Here, replace <username> with your user profile name and <virtualmachine> with the VM where you get this error.
  3. If <virtualmachine>.vbox does not exist, copy <virtualmachine>.vbox-tmp and name the copied file as <virtualmachine>.vbox

Note: In old versions, the extension is .xml instead of .vbox.

Result Code: E_FAIL (0x80004005) due to Hypervisor

If the error is due to Hypervisor, you’ll likely see VT-x or Hyper-V in the error messages. It’s because Hypervisor conflicts with VirtualBox’s usage of virtualization resources in your system. Try the methods below to debug this issue:

Enable Virtualization in BIOS/UEFI

You must enable Virtualization in your system to operate the VirtualBox. You can do so from your BIOS/UEFI settings.

Check out our article on How to Enable Virtualization in BIOS for more information.

Update VirtualBox

Before, VirtualBox VMs would not run when Hypervision (Hyper-V) was active. So it was impossible to use VirtualBox together with any applications that needed Hyper-V, such as Docker.

However, VirtualBox 6 has introduced experimental support for Hyper-V. So, update VirtualBox to the latest version to avoid this issue.

Restart Hypervisor

If you already use VirtualBox v6+, it is possible that Hypervisor is not running correctly. Resetting its launch type configuration should fix this issue. Here’s how you can do so:

1- Open Run command.

2- Type cmd and press Ctrl + Shift + Enter. It will load the elevated Command Prompt.

3- Type the following command and press Enter to execute it:
bcdedit /set hypervisorlaunchtype off


hypervisor-launcher-type

4- If you have more than one OS, use the command
bcdedit /set {current} hypervisorlaunchtype off

5- Restart your PC.

6- Open the elevated Command Prompt again and enter:
bcdedit /set hypervisorlaunchtype auto

7- Restart your computer and open the virtual machine again.

Disable Hypervisor Processes

As we have mentioned above, the versions before and including VirtualBox 5.x do not support running VMs with active Hypervision. Hyper-V hogs a large portion of virtualization resources and prevents the VirtualBox from launching a VM.

So, you must disable all Hypervision processes to fix this error in those VirtualBox builds. To do so,

1- Open the Run dialog box and enter optionalfeatures. It will direct you to the Turn Windows features on or off wizard.

2- Search for and uncheck the following options:

  • Hyper-V
  • Containers
  • Windows Hypervision Platform
  • Windows Subsystem for Linux


disable-hypervisor-features

3- Close the wizard and open the elevated Command Prompt.

4- Enter the following command: bcdedit /set hypervisorlaunchtype off

5- Restart your PC and check if the error persists.

Disable Device Guard or Credential Guard

The Device Guard and Credential Guard use virtualization technology to protect your system and credentials from external harm. So, enabling this feature will also take away virtualization resources and cause this error.

You can use one of the following methods to disable this feature:

Through Command Prompt:

Open the elevated Command Prompt and enter the following commands:

mountvol X: /s
copy %WINDIR%\System32\SecConfig.efi X:\EFI\Microsoft\Boot\SecConfig.efi /Y
bcdedit /create {0cb3b571-2f2e-4343-a879-d86a476d7215} /d "DebugTool" /application osloader
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} path "\EFI\Microsoft\Boot\SecConfig.efi"
bcdedit /set {bootmgr} bootsequence {0cb3b571-2f2e-4343-a879-d86a476d7215}
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} loadoptions DISABLE-LSA-ISO
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} device partition=X:
mountvol X: /d

Note: Replace X with an unused drive.

Through Device Guard and Credential Guard hardware readiness tool:

  1. Download the Device Guard and Credential Guard hardware readiness tool.
  2. Open PowerShell as administrator and navigate to the location of the downloaded file. 
  3. Enter the command DG_Readiness_Tool_v3.6.ps1 -Disable -AutoReboot while replacing v3.6 with the version of the readiness tool.

Disable Memory Integrity

Similar to the above case, Memory Integrity uses virtualization to isolate processes while protecting your core system from external threats. You need to disable this option as well if you encounter the E_FAIL (0x80004005) error.

You can do so by following any one of the ways mentioned below:

Through Settings:

Press Win + I to launch Settings.

Go to Update & Security Windows Security Device security.


device-security

Click Core isolation details.

Toggle off Memory integrity.


memory-integrity

Through Group Policy Editor:

  1. Enter gpedit.msc in the Run command.
  2. Navigate through: Computer Configuration Administrative Templates System Device Guard.
  3. Search for and double-click on Turn on Virtualization Based Security.
  4. Check Disabled and Click Ok.

If you use the Home Edition of Windows, here’s how you can Enable Gpedit on your machine.

Result Code: E_FAIL (0x80004005) due to Duplicate Config Values

In this case, you’ll see the message “Duplicate config values’/CPUM/CMPXCHG16B’ and ‘/CPUM/IsaExts/CMPXCHG16B’ – please remove the former! “. Just like the message says, you need to remove the former instruction from the Virtual Machine vbox file. To do so on Windows,

  1. Open the elevated Command Prompt.
  2. Enter the following commands:
    • cd “%systemdrive%\Program Files\Oracle\VirtualBox”
    • VBoxManage.exe list vms
  3. Look for the name of the VBOX machine where you got the E_FAIL (0x80004005) error.
  4. Enter the command: VBoxManage.exe setextradata “VBOX Machine” VBoxInternal/CPUM/CMPXCHG16B while replacing “VBOX Machine” with the name from the previous step.
  5. Open VirtualBox and launch the VM again and check if the error persists.
  6. If the error appears again, close the VirtualBox, go to the Command Prompt and enter: VBoxManage.exe setextradata global VBoxInternal/CPUM/CMPXCHG16B

Other Solutions for Result Code: E_FAIL (0x80004005)

While the sections above involve troubleshooting the most common reasons for this error, there are still some cases where those methods are ineffective. Here are some additional solutions that are applicable in such circumstances.

Manually Run the Process

If opening the VM or mounting an iso file through the VirtualBox causes the error, you can attempt to manually execute these processes.

Go to the VM folder in the file explorer and open the program for the first case. Similarly, instead of mounting the file with the VirtualBox, use the mount feature in your OS to mount it to a virtual disk.

Discard the Session or Snapshot

VirtualBox updates or improper shutdowns can corrupt VM save states and snapshots. You need to discard the save state or the snapshot tree branch to fix this issue.

Disable/Uninstall Interfering Parties

There are many cases of other processes interfering with VirtualBox. The VirtualBox hardening log created after encountering this error should contain additional information on responsible parties. You can check the log or seek help from VirtualBox technical support personnel to diagnose this issue.

The most common third-party programs responsible for this include IBM Security Trusteer Rapport and Cyclance Protect. Many third-party antivirus programs are also known to cause this issue. So, make sure to disable or uninstall these programs.

Some users have also mentioned that they suffered from this error after running the Driver Verifier. To disable this feature, launch Command Prompt as administrator and enter:
verifier /reset

Reinstall to Latest Version

Some of the old versions of VirtualBox had many bugs. So, we recommend updating to the latest edition as soon as possible. It is better to uninstall the old version and install the newest build using its installer. Here are the steps for this process:

On Windows:

Download the latest VirtualBox along with the matching ExtPack.

Uninstall third-party antivirus if you haven’t already done so.

Go to Control Panel Programs and Features > Uninstall a program and uninstall your VirtualBox application.


uninstall-virtualbox

Go to the installer file from step 1.

Right-click it and select Run as administrator.

Follow the on-screen instructions.

On the last installation page, check Start Oracle VM VirtualBox…after installation and click Finish.

On the VirtualBox, select File Preferences Extensions.

Click the icon with a downwards orange arrow and select the ExtPack.


add-virtualbox-extension

On Linux:

Open the terminal and enter the following commands:

sudo apt-get update
sudo apt-get purge virtualbox
sudo apt-get purge virtualbox-ext-pack
sudo apt-get install virtualbox
sudo apt-get install virtualbox-ext-pack

Restart VirtualBox and check if you encounter the 0x80004005 error.

Roll-back to Old Version

The latest versions of VirtualBox no longer support old Operating Systems like Windows 7. You will have to roll-back to an earlier version of VirtualBox in such cases. Check which version works and download its installer. Then install it using the steps from the above method.

It is also possible for the latest versions to contain some unresolved bugs. You should roll back to the last stable version until a new update appears in such cases.

Reset Network Adapters

Some minor issues with the VM network adapters have been known to cause this error as well. It mostly happens after an update. You need to reset the network adapter to fix this issue. To do so,

Select your VM and click Settings.

Go to Network and uncheck Enable Network Adapter.


disable-network-adapter

Start the VM while the network adapter is disabled.

Close the VM properly and enable the Network Adapter again.

Now launch the VM again and check if the error reoccurs.

You can also enter the following commands on the PowerShell to reset Network Adapters for VirtualBox:
disable-netadapter -InterfaceDescription "VirtualBox*" -confirm:$false
enable-netadapter -InterfaceDescription "VirtualBox*" -confirm:$false

Install VirtualBox Driver

VirtualBox uses VBoxDrv.inf as a driver. It should automatically install on your system while installing the VirtualBox. However, the installation process is known to fail in some cases.

You need to manually install it to fix the issue. Here’s how you can do so: 

Go to the driver installer folder.

In the default installation on Windows, it should be in:
C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv

Right-click on VBocDrv.inf and select Install.


install-virtualbox-driver

Update Graphics Drivers

This error can also happen if the application tries to access an invalid memory address. It occurs mostly because of a graphics-related DLL. Update your graphics card driver to fix this issue. Follow the steps below to do so,

Enter devmgmt.msc on the Run command.

Expand Display Adapters and right-click on your graphics device.

Select Update Driver.


Device-manager-Graphics-update

Click Search automatically for drivers.

Restart your PC.

If your graphics driver is fully updated, you can uninstall it and restart your system to reinstall the driver. It will fix any minor errors present in the driver.

Repair System Corruption

Missing or corrupted DLL files are responsible for several system and application errors. If you encounter the E_FAIL (0x80004005) error, it is worth running the System File Checker to repair the DLL files.

Mohamed SAKHRI
Mohamed SAKHRI

I'm the creator and editor-in-chief of Tech To Geek. Through this little blog, I share with you my passion for technology. I specialize in various operating systems such as Windows, Linux, macOS, and Android, focusing on providing practical and valuable guides.

Articles: 1278

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *