VirtualBox无法打开虚拟机会话时显示“E_FAIL (0x80004005)”错误代码。该错误可能是由于VirtualBox应用程序、配置文件或硬件相关问题的问题。
本教程重点介绍了Windows(Windows)设备
上E_FAIL (0x80004005) VirtualBox错误的可能原因和故障排除解决方案。
1.更新VirtualBox
一些 Windows 用户(Some Windows users)通过安装最新版本的VirtualBox 6解决了这个错误。前往开发人员的网站(developer’s website)并下载Windows主机VirtualBox设置文件。
您还可以直接在应用程序中更新VirtualBox 。打开VirtualBox Manager应用程序,在菜单栏上选择File ,然后选择(File)Check for Updates。
选择提供的链接以下载最新版本的VirtualBox的可执行 (.exe) 文件。
2. 重启Windows Hypervisor ( Hyper-V )
Hyper-V是一项 Windows 功能,可让您的计算机将多个操作系统作为虚拟机运行。如果Hyper-V出现故障
,您可能无法访问VirtualBox中的虚拟机。(VirtualBox)
在Windows中重新启动Hyper-V(参见下面的步骤)可以解决阻止VirtualBox运行虚拟机会话的问题。
- 打开开始(Start)菜单,在搜索栏中键入 cmd,然后在命令提示符(Command Prompt)应用
下方选择以管理员身份运行。(Run)
- (Paste)在命令提示符控制台中(Command Prompt)粘贴bcdedit /set hypervisorlaunchtype off并按Enter。
运行此命令会关闭计算机上的Hyper-V。如果您的计算机上安装了多个操作系统,请运行以下命令为活动/当前操作系统禁用Hyper-V。
(Paste)在命令提示符控制台中(Command Prompt)粘贴bcdedit /set {current} hypervisorlaunchtype off并按Enter。
当您收到“此操作已成功完成”消息时重新启动计算机。
- 使用管理权限打开命令提示符(Command Prompt)并运行以下命令以重新启用Hyper-V。
bcdedit /set hypervisorlaunchtype auto
当命令提示符(Command Prompt)显示“操作成功完成”消息时,再次重新启动计算机。启动VirtualBox并尝试打开虚拟机。
3.丢弃保存的状态
(VirtualBox)如果虚拟会话的保存状态有问题, (virtual session’s saved state)VirtualBox也可能显示E_FAIL (0x80004005) 错误。因此,如果您无法恢复会话,请放弃保存的状态并重新打开虚拟机。
丢弃机器的保存状态与关闭它具有相同的效果。打开VirtualBox,右键单击虚拟机,选择Discard Saved State(或按Ctrl + J),然后重新启动会话。
如果“放弃保存的状态”呈灰色显示,请尝试以下故障排除解决方案 - 即虚拟机没有保存状态。
4.重命名VirtualBox配置文件(VirtualBox Configuration Files)
(Force-quitting VirtualBox)在没有先关闭虚拟机的情况下强制退出 VirtualBox会触发E_FAIL (0x80004005) 错误。我们将解释如何以及为什么会发生这种情况。
假设您在VirtualBox中有一个“Linux PC”虚拟机。当您启动虚拟机时,VirtualBox将机器的文件从“Linux PC.vbox”重命名为“ Linux PC.vbox-prev ”。VirtualBox然后为活动会话创建并使用虚拟机文件的新/临时副本——“Linux PC.vbox-tmp”。
当您结束虚拟机会话时,VirtualBox将临时文件(即Linux PC.vbox-tmp)重命名为Linux PC.vbox。“ Linux PC.vbox -prev”文件用作备份——每次您启动新会话时,
VirtualBox都会覆盖该文件。(VirtualBox)
在不关闭虚拟机的情况下终止VirtualBox可能会中断文件转换过程。(VirtualBox)这将在您下次尝试启动虚拟机时
提示“结果代码(Result Code):E_FAIL (0x80004005)”错误。(E_FAIL)
打开您 PC 的VirtualBox文件夹并检查您的虚拟机是否有 .vbox 文件。如果您仅在文件夹中找到临时 (.vbox-tmp) 和备份 (.vbox-prev) 文件,则您可能在运行虚拟机时
强制关闭了VirtualBox 。
重命名备份文件可以解决问题并使您的虚拟机再次运行。关闭VirtualBox Manager应用程序并按照以下步骤完成它。
- 在File Explorer(File Explorer)中打开 VirtualBox 的文件管理器。打开本地磁盘 (C:) 文件夹,双击用户(Users)文件夹,然后选择您的计算机或帐户名称。
- 打开VirtualBox VMs文件夹,选择Machines,然后双击虚拟机的文件夹。
- 将这两个文件(.vbox-tmp 和 .vbox-prev)复制或备份到您计算机上的某个位置。将临时文件的文件扩展名从 .vbox-prev 更改为 .vbox。
- 在警告提示上选择 OK并在(Select OK)VirtualBox中打开虚拟机。
- 如果错误仍然存在,请关闭 VirtualBox(Close VirtualBox)并将 .vbox 文件更改回 .vbox-prev。之后(Afterward),将 .vbox-temp 文件重命名为 .vbox 并检查VirtualBox现在是否运行虚拟机。
注意:较旧的VirtualBox版本(v3.2 和更早版本)以(VirtualBox).xml格式存储虚拟机配置文件,而不是.vbox。如果您在虚拟机文件夹中找到具有此扩展名的文件,请按照上述步骤重命名它们。这意味着您将.xml -prev 或.xml -tmp 格式的文件更改为.xml。
5. 在BIOS 设置(BIOS Settings)中启用虚拟化
您必须在计算机上启用硬件或CPU虚拟化才能运行虚拟机。(CPU)如果VirtualBox在错误详细信息中包含“ AMD-v ”或“VT-x”关键字,则您的 PC 的硬件虚拟化可能已禁用。
请按照以下步骤验证您的计算机的硬件虚拟化状态。
- 转到Settings > System>Recovery > Advanced启动,然后选择立即重新启动(Restart)。
在Windows 10中,前往Settings > Updates和Security > Recovery”,然后在“高级启动”部分中
选择“立即重新启动”。(Restart)
- 前往疑难解答。> 高级选项。> UEFI Firmware Settings并选择重新启动(Restart)以启动到您的 PC 的UEFI或BIOS设置。
- 如何在BIOS设置中启用虚拟化取决于您的 PC 制造商或型号。对于Lenovo设备,前往配置(Configuration)部分并将Intel Virtual Technology设置为Enabled。
前往 HP 电脑上的配置(Configuration)部分并保持启用虚拟化技术(Virtualization Technology)。此Microsoft 支持文档(Microsoft Support document)包含为所有 PC 制造商和设备启用虚拟化的说明。
- 前往“退出”部分,选择 Exit Saving Changes,然后选择Yes以启动Windows。
(VirtualBox)BIOS/UEFI设置
中启用虚拟化后,VirtualBox现在应该运行虚拟机。
6.重新安装VirtualBox
如果故障排除技巧都无法解决问题,请卸载VirtualBox 。之后(Afterward),重新启动计算机并安装最新的VirtualBox版本。重新安装VirtualBox解决了此Microsoft 社区线程中某些(Microsoft Community thread)Windows用户的问题。
在开始(Start)菜单搜索中键入 virtualbox ,选择Oracle VM VirtualBox应用下方的卸载(Uninstall),然后按照卸载提示进行操作。
(Contact Oracle Support)如果重新安装VirtualBox后“结果代码: (VirtualBox)E_FAIL (0x80004005)”错误仍然存在,请联系 Oracle 支持或您的 PC 制造商。
6 Ways to Fix VirtualBox Result Code: E_FAIL (0x80004005) Error in Windows
VirtualBox displays the “E_FAIL (0x80004005)” error code when it can’t open a virtual machine session. The error could be due to problems with the VirtualBox app, configuration files, or hardware-related issues.
This tutorial highlights probable causes and troubleshooting solutions for the E_FAIL (0x80004005) VirtualBox error on Windows devices.
1. Update VirtualBox
Some Windows users resolved this error by installing the latest build of VirtualBox 6. Head to the developer’s website and download the Windows hosts VirtualBox setup file.
You can also update VirtualBox directly within the app. Open the VirtualBox Manager app, select File on the menu bar, and select Check for Updates.
Select the provided link to download the executable (.exe) file of the latest version of VirtualBox.
2. Restart the Windows Hypervisor (Hyper-V)
Hyper-V is a Windows feature that lets your computer run multiple operating systems as virtual machines. You may be unable to access virtual machines in VirtualBox if Hyper-V is experiencing a glitch.
Restarting Hyper-V in Windows (see steps below) can fix issues preventing VirtualBox from running virtual machine sessions.
- Open the Start menu, type cmd in the search bar, and select Run as administrator below the Command Prompt app.
- Paste bcdedit /set hypervisorlaunchtype off in the Command Prompt console and press Enter.
Running this command turns off Hyper-V on your computer. If you have multiple operating systems installed on your computer, run the command below to disable Hyper-V for the active/current OS.
Paste bcdedit /set {current} hypervisorlaunchtype off in the Command Prompt console and press Enter.
Restart your computer when you get a “This operation completed successfully” message.
- Open Command Prompt with administrative privileges and run the command below to re-enable Hyper-V.
bcdedit /set hypervisorlaunchtype auto
Restart your computer again when Command Prompt displays a “The operation completed successfully” message. Launch VirtualBox and try opening the virtual machine.
3. Discard Saved State
VirtualBox may also display the E_FAIL (0x80004005) error if there’s a problem with the virtual session’s saved state. So, if you cannot restore a session, discard the saved state and reopen the virtual machine.
Discarding a machine’s saved state has the same effect as shutting it down. Open VirtualBox, right-click the virtual machine, select Discard Saved State (or press Ctrl + J), and restart the session.
Try the troubleshooting solutions below if “Discard Saved State” is greyed out—i.e., the virtual machine has no saved state.
4. Rename VirtualBox Configuration Files
Force-quitting VirtualBox without first closing a virtual machine can trigger the E_FAIL (0x80004005) error. We’ll explain how and why this happens.
Let’s assume you have a “Linux PC” virtual machine in VirtualBox. When you launch the virtual machine, VirtualBox renames the machine’s file from “Linux PC.vbox” to “Linux PC.vbox-prev.” VirtualBox then creates and uses a new/temporary copy of the virtual machine file—”Linux PC.vbox-tmp”—for the active session.
When you end the virtual machine session, VirtualBox renames the temporary file (i.e., Linux PC.vbox-tmp) to Linux PC.vbox. The “Linux PC.vbox-prev” file serves as a backup—VirtualBox overwrites the file every time you start a new session.
Terminating VirtualBox without closing your virtual machine can disrupt the file conversion process. That’ll prompt the “Result Code: E_FAIL (0x80004005)” error the next time you try to launch the virtual machine.
Open your PC’s VirtualBox folder and check if there’s a .vbox file for your virtual machine. If you only find temporary (.vbox-tmp) and backup (.vbox-prev) files in the folder, you probably force-closed VirtualBox while running a virtual machine.
Renaming the backup file can fix the problem and get your virtual machine running again. Close the VirtualBox Manager application and follow the steps below to get it done.
- Open the VirtualBox’s file manager in File Explorer. Open your local disk (C:) folder, double-click the Users folder, and select your computer or account name.
- Open the VirtualBox VMs folder, select Machines, and double-click the virtual machine’s folder.
- Copy or backup both files (.vbox-tmp and .vbox-prev) somewhere on your computer. Change the file extension of the temporary file from .vbox-prev to .vbox.
- Select OK on the warning prompt and open the virtual machine in VirtualBox.
- Close VirtualBox and change the .vbox file back to .vbox-prev if the error persists. Afterward, rename the .vbox-temp file to .vbox and check if VirtualBox now runs the virtual machine.
Note: Older VirtualBox versions (v3.2 and older) store virtual machines configuration files in .xml format—not .vbox. If you find files with this extension in your virtual machine folder, rename them following the steps above. That means you’ll change files in .xml-prev or .xml-tmp format to .xml.
5. Enable Virtualization in BIOS Settings
You must have hardware or CPU virtualization enabled on your computer to run virtual machines. If VirtualBox includes the “AMD-v” or “VT-x” keywords in the error details, your PC’s hardware virtualization is likely disabled.
Follow the step below to verify your computer’s hardware virtualization status.
- Go to Settings > System > Recovery > Advanced startup and select Restart now.
In Windows 10, head to Settings > Updates & Security > Recovery and select Restart now in the “Advanced startup” section.
- Head to Troubleshoot.> Advanced options.> UEFI Firmware Settings and select Restart to boot into your PC’s UEFI or BIOS settings.
- How you enable virtualization in the BIOS settings will depend on your PC manufacturer or model. For Lenovo devices, head to the Configuration section and set Intel Virtual Technology to Enabled.
Head to the Configuration section on HP computers and keep Virtualization Technology enabled. This Microsoft Support document has instructions for enabling virtualization for all PC manufacturers and devices.
- Head to the “Exit” section, select Exit Saving Changes, and select Yes to boot into Windows.
VirtualBox should now run the virtual machine after enabling virtualization in your PC’s BIOS/UEFI settings.
6. Reinstall VirtualBox
Uninstall VirtualBox if none of the troubleshooting tricks resolve the problem. Afterward, reboot your computer and install the latest VirtualBox version. Reinstalling VirtualBox fixed the problem for some Windows users in this Microsoft Community thread.
Type virtualbox in the Start menu search, select Uninstall below the Oracle VM VirtualBox app and follow the uninstallation prompt.
Contact Oracle Support or your PC manufacturer if the “Result Code: E_FAIL (0x80004005)” error persists despite reinstalling VirtualBox.