Is there any way to fix E_FAIL (0x80004005)?


I URGENTLY need help because I have an assignment due tonight. Thank you in advance!

This is the error that I am receiving:

Failed to open a session for the virtual machine myMachine.

Could not open the medium 'C:\Users\...\Snapshots/{2e933747-5235-41f1-8ba8-c6368a235243}.vhd'.

VD: Image file 'C:\Users\...\Snapshots/{2e933747-5235-41f1-8ba8-c6368a235243}.vhd' is corrupted and can't be opened (VERR_VD_IMAGE_CORRUPTED).

Result Code: E_FAIL (0x80004005)
Component: MediumWrap
Interface: IMedium {ad47ad09-787b-44ab-b343-a082a3f2dfb1}

I realize this question has been asked before here, but I tried running DISM.exe /Online /Cleanup-image /Restorehealth then sfc /scannow, but it didn't help. I also tried uninstalling and reinstalling VirtualBox, but it didn't help. I also disabled Hyper-V through the Control Panel and ran Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor in the powershell

Host: Windows 10 Pro: Version 10.0.19042
Virtual Machine: Debian Linux (Version 10)

asked on Super User Apr 6, 2021 by ZisIzHell • edited Apr 8, 2021 by ZisIzHell

1 Answer


I URGENTLY need help because I have an assignment due tonight. Thank you in advance!

You most likely have to create a new virtual machine and install Debian on it. One of your snapshots for the Virtual Machine is corrupt. {2e933747-5235-41f1-8ba8-c6368a235243}.vhd is likely 0 KB, if that is the case, there isn't any solution to your problem. You can try to delete the corrupt snapshot from the snapshot chain.

Your issue is best explained by the following:

When a virtual disk is first created for a new virtual machine, it is considered as the base disk for the guest - data for the guest is read from and written to that disk image.

The differencing disk records changes sector-by-sector to the whole disk image, not changes to any file in the disk. VirtualBox does not know what file system is employed on the disk image and therefore can not access any individual file of/on the disk image; only the guest OS is aware of that information.

First Snapshot creates a differencing disk for read/write access while the base disk becomes read-only - as the guest modifies its data, the data is written to the differencing disk and the base disk is untouched.

Second Snapshot creates another, new, differencing disk for read/write access while the first differencing disk becomes read-only along with the base disk.

Subsequent Snapshots create additional differencing disks, with the preceding differencing disk joining the hierarchy (pecking order/chain) of read-only disks.

Keep in mind that access to/from the virtual disks is sector-by-sector, not file-by-file.

When the guest requests that a sector be read, the latest Snapshot is read first. If the sector is not found there (Sector-Not-Found is returned), the next Snapshot in the chain (youngest to oldest) is read, until the base virtual disk is reached. Then the sector on/in the base virtual disk is either read or Sector-Not-Found is returned.

enter image description here

I've marked the changes from "Snapshot 2" (the "B" sectors) differently for a reason. Say that you go outside of VirtualBox and you delete "Snapshot 2". Or the file gets corrupted, truncated or somehow modified. And then you try to recreate your hard drive. With all the "B" sectors missing that would be an impossibility.

People often confuse that a "Snapshot" is and what the "HD state" is. They think that when they're taking a snapshot they take a differential backup of the files and if they delete a snapshot manually they can recover from it. No. enter image description here


answered on Super User Apr 6, 2021 by Ramhound • edited Apr 6, 2021 by Ramhound

User contributions licensed under CC BY-SA 3.0