When installing VirtualBox it gives an error. What to do if you couldn’t open a session for a virtual machine. Removing and replacing program files

When trying to start a session in the VirtualBox virtualization tool, the user may encounter an error and the corresponding message “Failed to open a session for the virtual machine” (error code E_FAIL (0x80004005)). This error occurs quite stochastically; just yesterday the program could work stably, but now it refuses to start at all. In this article, I will tell you what this E_FAIL error is, what causes it, and how to fix the E_FAIL error (0x80004005) on your PCs.

As I mentioned above, this error appears when using the VirtualBox program (virtualization software) in a situation where VirtualBox itself was unable to correctly write the system state to the corresponding vbox file.

The reasons for this situation may be damage to the vbox file itself, its occupation by another process, incorrect operation of one of the Windows OS updates, and also when some of the Windows OS files are patched by the “Universal Theme Patcher” application.

Error in VirtualBox

How to fix E_FAIL error (0x80004005)

There are several effective ways to get rid of the E_FAIL (0x80004005) error. Let's look at them in order.

Method number 1. Delete and rename files in VirtualBox

Let's follow the path:

C:\Users\Username\VirtualBox VMs\Name of your virtual machine\.

There should be two files there with the name of your virtual machine, and the extension .vbox and .vbox-prev. Make backup copies (of) these files by storing them somewhere safe on your PC. Then delete the file with the .vbox extension in the above directory, and rename the file with the .vbox-prev extension, giving it the name and extension (.vbox) of the previously deleted file.

After performing this operation correctly, the E_FAIL (0x80004005) error can be resolved.

Method number 2. Use the functionality of the SFC utility

Run the command line as an administrator (click the “Start” button, enter cmd in the search bar, the name of the found utility of the same name will appear at the top). Right-click on it and select “Run as administrator” from the menu that appears.

In the command line window that appears, type:

sfc /scannow - wait for the system file integrity check to finish, restart your computer, and then try to launch “VirtualBox”.

Method number 3. Uninstalling a problematic Windows OS update

Sometimes one of the reasons for the problem with error code E_FAIL (0x80004005) is the operation of one of the Windows OS updates. To uninstall this update, run the command prompt again as an administrator (as indicated above), type there:

wusa /uninstall /kb:3004394 — and press enter. Then restart your PC and try to launch VirtualBox.

Method number 4. Try installing a stable version of "VirtualBox".

Not every version of VirtualBox works stably and reliably. Some have quite strange failures, glitches, and regular program crashes. At the same time, two versions of “VirtualBox”, namely 4.3.10 and 4.3.12, have proven themselves to be the best in this regard, causing a minimum of user complaints. Therefore, I recommend uninstalling your current version of the program (without deleting the virtual hard drive file), and installing one of the specified versions of the product instead.

You can also look for even earlier versions of “VirtualBox”, they may work more congruently with older versions of operating systems (if you have one).

Method No. 5. Change BIOS settings

If support for “Intel Virtualization Technology” is disabled in your BIOS, then you need to activate it to fix E_FAIL (0x80004005). Go to your BIOS when booting your PC (usually using the F2 or Del keys), find the “Intel Virtualization” (or similar) option in the BIOS, and set it to “Enabled”.

Conclusion

The solution to the E_FAIL error (0x80004005) is to follow the tips I listed above. Usually, the first of the mentioned tips is enough to eliminate the E_FAIL error (0x80004005) and restore normal operation of the VirtualBox program. If the first of the tips did not help, then use the other alternatives listed above, they will fix the E_FAIL (0x80004005) error on your PC.

In contact with

Running the operating system on VirtualBox is one of the best ways to preview it before installing it directly...

How to fix "E_FAIL 0x80004005" error in VirtualBox

From Masterweb

09.05.2018 02:00

Running an operating system on VirtualBox is one of the best ways to preview it before installing it directly on your computer. But when trying to start the OS, the user may see the error E_FAIL 0x80004005, which completely stops the system from starting. In this article we will tell you what to do in this case.

Reasons for the error

Before moving directly to ways to resolve the E_FILA 0x80004005 error in VirtualBox, it is necessary to discuss the reasons for its occurrence in order to prevent this situation from reoccurring in the future.

Often this error appears spontaneously. The most interesting thing is that it will not be displayed if the virtual machine has just been installed; this only happens if you have already run some operating system on it. In some situations, this happens due to a failure to perform the initial startup of the operating system. This happens for several reasons:

  1. An error occurred while saving the session.
  2. Due to disabled virtualization option in BIOS.
  3. Unstable version of the virtual machine.
  4. Conflict between the hypervisor and the virtual machine (occurs only on 64-bit systems).
  5. Error in Windows update.

Now we have found out the main reasons for the error E_FAIL 0x80004005, so we can proceed directly to the solutions.

Changing internal file names

As mentioned earlier, error code E_FAIL 0x80004005 may appear if a previous session of using the operating system in a virtual machine ended with an error. In this case, to fix it you will need to rename several files; now we will tell you how to do this.

Note: To be able to complete all the steps in the instructions below, you need to enable the display of hidden folders. You can do this in “Folder Options” or in “Explorer Options” (depending on the version of Windows).

So, do the following in the guest OS folder:

  1. Go to the directory where the operating system files that run in VirtualBox are stored. If you have not changed the program parameters, then the path to them will be as follows: “Drive C Users -> UserName -> VirtualBox” (without quotes) and “VMs -> Name_guest_OS” (without quotes).
  2. Once in the folder with the operating system that the error occurs when starting, you should see two files that look like this: “name.vbox” and “name.vbox-prev”, where instead of “name” there will be the name of the operating system that you specified when creating it. You need to cut the file "name.vbox" and move it to any other folder.
  3. After this, rename the file “name.vbox-prev”, removing the ending “-prev”.

After that, go to another folder - "VirtualBox" and do these steps:

  1. Cut the "VirtualBox.xml" file and move it to any other location.
  2. Rename the file "VirtualBox.xml-prev" to "VirtualBox.xml".
  3. Close Explorer windows and try to start the virtual machine.

Complete all these steps, the E_FAIL 0x80004005 error should disappear and the operating system will work stably.

Enabling virtualization in BIOS

Now let's look at a situation where the disabled virtualization option is to blame for the E_FAIL 0x80004005 error in VirtualBox. As was said at the beginning of the article, it is enabled and disabled in the BIOS, so all settings will take place there. In order to return the program to functionality, you need to do the following:

  1. In Award BIOS, go to the Advances BIOS Features tab, where you find the Virtualization parameter and set the value to Enabled.
  2. In AMI BIOS, you need to go to the Advances tab, then open the Intel(R) parameter and put the switch there in the Enabled position.
  3. In ASUS UEFI, you need to follow approximately the same path: “Advances -> Intel Virtualization -> Enabled” (without quotes).

After this, save all changes and restart your computer. Once you get to the desktop, try running the operating system in the virtual machine again - everything should work fine.

Updating a virtual machine


We have already said that the cause of the error in VirtualBox E_FAIL 0x80004005 was an unstable version of the program. Most often this happens after updating it. If this is the case, then you have two options to choose from:

  1. Wait for the release of a new, more stable version of the application. Of course, this can take a lot of time, but developers often correct errors quite quickly. By the way, to check if a new version has been released, you need to click on the “File” button in the program and select “Check for updates.”
  2. Reinstall the program. This method is faster, but not everyone understands computers enough to roll back to the previous (stable) version of the program on their own. In any case, if you still have the program installer, just run it and install VirtualBox again. Otherwise, go to the developer's website and download the previous version of the application.

If the cause of the error E_FAIL 0x80004005 was an unstable version of the program, then after following the instructions presented everything should go fine, otherwise proceed to the next method.

Disabling Hyper-V

Modern versions of operating systems support Hyper-V technology, which can sometimes conflict with a virtual machine, which is why the error in question occurs. Accordingly, in order to eliminate the error, this technology must be disabled.

  1. Log in to the "Control Panel".
  2. Go to the Programs and Features menu.
  3. Click the "Turn Windows features on or off" link.
  4. In the new window, find the “Hyper-V” component and uncheck it.
  5. Click OK.
  6. Restart your computer.

The error should disappear.

Error 0x80004005 most often occurs when a user tries to open a virtual machine in the VirtualBox application. The reason is the inability to find the file from the previous session. The failure could have occurred during recording or when the sectors on which the data was stored were damaged. In this case, we see error code 0x80004005 in Windows 10 and the program fails to open. Next, we will talk about several ways to deal with the problem.

Method 1

The E-FAIL error code 0x80004005 can be resolved by simply renaming the files in the virtual machine folder. If a failure occurs, the session is still saved, but the prefix –prev, sometimes –tmp, is added to the vbox extension. In this case, the source file that is being searched is missing, but the information can be retrieved.

The reason 0x80004005 appears in VirtualBox Windows 10 is located in the user folders of the system drive. Open a directory like From:/users/[Current NAME]/VirtualBox VMs.

Go to the directory with the machine name. Here you will see not only the “native” file with a normal extension, but also one that was saved with problems.

Save the original file with the .vbox extension to another location just in case. And rename the one with an unwanted prefix.

We proceed in the same way with the .VirtualBox folder. After this, restart the application, error 0x80004005 should disappear.

Method 2

In the case where there is no “incorrect” session document, but error code 0x80004005 Windows 10 occurs, how to fix it in order to enjoy the benefits of the VM? Let's try to roll back the changes from Microsoft. Many people remove this function in their OS, but if you forgot or simply didn’t think about it, then in one of the received packages you can get KB: 3004394. It needs to be removed.

  • Launch the PowerShell directive execution shell (required as an administrator). To do this, right-click (right mouse button) on the menu button.

  • Type wusa /uninstall /kb:3004394 and press Enter.

The unwanted update will be removed.

Method 3

The error “E-FAIL 0x80004005” in VirtualBox Windows 10 may appear when virtualization is disabled in the BIOS. You need to go into basic settings upon boot. For many PCs, this is done using the F2 button, which is pressed immediately after turning on the computer. Laptops may have a special button. For example, on Lenovo it is located next to the power key.

If this does not work for you, then a new version is installed - UEFI. In this case, you need to hold down +[I] at the same time and go to the updates and security section.

Here in the recovery area, click the reboot button.

During the startup process, different menus will appear on a blue background. Go sequentially: TroubleshootingExtra optionsUEFI Firmware Settings.

To get rid of error 0x80004005 in VirtualBox, look for the Intel Virtualization section and enable it (the “Enabled” value).

If the problem is not in the virtual machine

A similar marker “0x80004005 unidentified error” also marks problems related to updates or the network.

Cumulative update KB3081424

Error message 0x80004005 appears in Update Center.

If this package is not installed for you, run the troubleshooting tool in the settings (in the same place where you looked for the BIOS entry).

If any pending updates are found, apply them.

Adobe Flash Player updates fail in Internet Explorer and Edge

In Windows 10, error 0x80004005 occurs when there are problems with the player. To fix it, go to settings and in the update center area, tap "Checking for updates". This will help fix error 0x80004005 if you have disabled automatic downloading of updates. You will have to wait until all packages that require installation are found.

You can always delete unwanted ones by following the link "View update history".

Click on the delete link.

Unable to connect to a remote PC via local network

If you have combined several computers into one network and are trying to access one of them, you may receive a ban with error 0x80004005. In this case, fix it through the registry editor.

  • +[R] – regedit

  • Go sequentially Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters.
  • Change the value of the AllowInsecureGuestAuth parameter to 1.

Write in the comments in what situations you encountered error 0x80004005 and how you got rid of it.

Is a mistake 0x80004005. It is unpleasant because it does not allow the virtual machine (or all machines) to start.

For myself, I identified three main reasons for this error:

  1. virtualization hardware is disabled;
  2. another virtualization system is running, which does not give VirtualBox access to hardware resources;
  3. VirtualBox cannot write machine state to the vbox file.

In this article, we will look at methods to fix the error in all three cases.

Virtualization hardware

The first reason is quite trivial. There are hardware virtualization technologies that make it possible to use isolated guest systems (you can read more about the differences between software and hardware virtualization online). If hardware virtualization functions are disabled in the computer's BIOS, VirtualBox will display error 0x80004005.

Error 0x80004005 in VirtualBox.

To enable hardware virtualization, you need to go to the BIOS and find the items Intel Virtualization Technology or AMD-V depending on the chipset.

The names may be different. For example, Intel VT, Virtualization Technology or simply Virtualization. The parameter value must be Enabled .

There is no strictly defined location for this item in the BIOS. It may be on the tab Advanced, System Configuration, Processor or some other.


Enable hardware virtualization in BIOS.

If enabling hardware virtualization did not help, let's go through the following points.

Conflict with other virtualization systems

VirtualBox, of course, is far from the only solution in the field of virtualization and it may conflict with other virtualization software for access to the hypervisor. The solution in this case is to remove other virtualization software.

Let's look at an example with Hyper-V, which is built in as a role in Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, as well as in the Professional and Enterprise editions of Windows 8, Windows 8.1 and Windows 10.

To disable the Hyper-V role you need to open Server Manager, go to section Roles and press Remove roles.

Will start Delete Role Wizard. The roles assigned to the server will be marked with check marks. You need to uncheck Hyper-V.

After removal, the server will require a reboot.

Those who like to tap their fingers on the keys will appreciate the ability to disable roles via .

To do this, run Windows PowerShell with administrator rights and load the Server Manager module:

Import-Module Servermanager

You can then work with Server Manager from PowerShell. In particular, delete roles. To remove the Hyper-V role, enter:

Remove-WindowsFeature Hyper-V -restart

The -restart parameter is needed for automatic rebooting and you can do without it.

An alternative to PowerShell is the command line, which also needs to be run as an administrator. The following command will help you remove Hyper-V:

ServerManagerCmd.exe -remove Hyper-V -restart

As with PowerShell, the -restart parameter is optional.

If you want to save the Hyper-V settings or for some reason the Hyper-V role is not removed from the system (this happens, unfortunately), then you can go the other way and disable the use of the hypervisor when Windows boots.

This can be done by editing the Windows boot loader. Unfortunately, gone are the days when editing the bootloader occurred through changes to a simple text file boot.ini. Now you need to go to the command line and use the utility bcdedit.exe.

Attention!

For any operation with the OS bootloader, it would be wise to first make a backup copy of the bootloader, and only then make changes.

Launch the command line as administrator. To create a backup, use the command:

bcdedit /export C:\BackupBCD\BCDfile

You can specify any path to the file and file name here. The only clarification is that the directory where it will be uploaded must already exist. So first create a folder (or use an existing one) and then run the command.

If there are spaces in the file path, you need to use quotes:

bcdedit /export "C:\My BackupBCD\BCDfile"

If something happens, the bootloader can be restored with the command:

bcdedit /import C:\BackupBCD\BCDfile

Now that the bootloader backup has been created, you can disable the system’s use of the hypervisor through it.

bcdedit /set hypervisorlaunchtype off

After this, you will need to reboot the system. This will lead to the fact that the role of Hyper-V in Windows will remain; you will be able to log into the Hyper-V shell, but you will not be able to launch the virtual machines created there. But you will be able to run virtual machines in VirtualBox.

To enable the use of the hypervisor, use the command:

bcdedit /set hypervisorlaunchtype auto

After this command, you also need to reboot the system.

If a conflict between virtualization systems is not our case, let's turn to another possible reason.

Error when trying to save virtual machine state

Sometimes VirtualBox cannot save the machine state to a file. This can happen if the file is damaged or occupied by another process. In this case, VirtualBox tries to save the state of the machine into files with the same name, but with the addition of the file extension -prev or -tmp at the end. Therefore, if the virtual machine does not boot, you can try loading its state from these files.

Go to the directories:

C:\Users\[username]\VirtualBox VMs\[machine name]

C:\Users\[username]\.VirtualBox\

The path to the directory with cars may differ from the default if you changed it yourself.

In the directory with machines you can find files with .vbox-prev or .vbox-tmp at the end.

If there are any, copy the file with .vbox at the end somewhere, and remove -prev from the file with .vbox-prev, thus replacing the machine state file.

Also, check both folders for files with .xml-prev and .xml-tmp at the end. If there are any, perform the same operation with them as with files with the .vbox extension.

P.S. And finally, it happens that VirtualBox conflicts with a Windows update KB3004394. You can try to remove this update via Control Panel → All Control Panel Items → Programs and Features → View installed updates(in different versions of Windows the names of menu items are slightly different) or through the command line as an administrator with the command:

wusa /uninstall /kb:3004394

After this you need to restart your computer. It may turn out that the root of the problem lay in such a small thing.


Sometimes VirtualBox.exe and other EXE system errors can be related to problems in the Windows registry. Several programs can use the VirtualBox.exe file, but when those programs are uninstalled or modified, sometimes "orphaned" (incorrect) EXE registry entries are left behind.

Basically, this means that while the actual path of the file may have changed, its incorrect former location is still recorded in the Windows Registry. When Windows tries to look up these incorrect file references (file locations on your PC), VirtualBox.exe errors can occur. Additionally, a malware infection may have corrupted registry entries associated with Oracle VM VirtualBox. Thus, these corrupt EXE registry entries need to be fixed to fix the problem at the root.

Manually editing the Windows registry to remove invalid VirtualBox.exe keys is not recommended unless you are PC service professional. Mistakes made when editing the registry can render your PC inoperable and cause irreparable damage to your operating system. In fact, even one comma placed in the wrong place can prevent your computer from booting!

Because of this risk, we highly recommend using a trusted registry cleaner such as %%product%% (Developed by Microsoft Gold Certified Partner) to scan and repair any VirtualBox.exe-related registry problems. Using a registry cleaner, you can automate the process of finding corrupted registry entries, missing file references (such as the one causing the VirtualBox.exe error), and broken links within the registry. Before each scan, a backup copy is automatically created, allowing you to undo any changes with one click and protecting you from possible damage to your computer. The best part is that eliminating registry errors can dramatically improve system speed and performance.


Warning: Unless you are an experienced PC user, we DO NOT recommend manually editing the Windows Registry. Using Registry Editor incorrectly may cause serious problems that may require you to reinstall Windows. We do not guarantee that problems resulting from incorrect use of Registry Editor can be corrected. You use Registry Editor at your own risk.

Before you manually repair the Windows registry, you must create a backup by exporting a portion of the registry associated with VirtualBox.exe (for example, Oracle VM VirtualBox):

  1. Click on the button Begin.
  2. Enter " command" V search bar... DON'T CLICK YET ENTER!
  3. While holding down the keys CTRL-Shift on your keyboard, press ENTER.
  4. A dialog box for access will be displayed.
  5. Click Yes.
  6. The black box opens with a blinking cursor.
  7. Enter " regedit" and press ENTER.
  8. In the Registry Editor, select the VirtualBox.exe-related key (for example, Oracle VM VirtualBox) you want to back up.
  9. On the menu File select Export.
  10. On the list Save to select the folder where you want to save the Oracle VM VirtualBox key backup.
  11. In field File name Enter a name for the backup file, for example "Oracle VM VirtualBox backup".
  12. Make sure the field Export range value selected Selected branch.
  13. Click Save.
  14. The file will be saved with extension .reg.
  15. You now have a backup of your VirtualBox.exe-related registry entry.

The following steps for manually editing the registry will not be described in this article, as they are likely to damage your system. If you would like more information about editing the registry manually, please check out the links below.