0

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)

7
  • 1
    Edit your question to indicate what version of VirtualBox you are running. Hyper-V isn't even a component of Windows 7 and cannot be enabled on any edition. If you are not actually using Windows 7 you should edit the tags and mention which version of Windows 10 you are using. – Ramhound Apr 6 at 13:59
  • Sorry about that, I'm using Windows 10 Pro: Version 10.0.19042 Build 19042 and the Virtual machine is running Debian 10 (64-bit) – ZisIzHell Apr 6 at 14:03
  • This isn't a system configuration error, the error specifically is indicating, the file {2e933747-5235-41f1-8ba8-c6368a235243}.vhd is corrupt. 0x80004005 return code is used when VirtualBox encounters a issue with a file. – Ramhound Apr 6 at 14:12
  • This explains your current problem. Since one of your snapshots are corrupt there really isn't a solution to your problem other than recreating the VM. – Ramhound Apr 6 at 14:19
  • Can you provide the output of dir /s "C:\Users\...\Snapshots/" and the relevant information about the snapshots from within the ..vbox file for the virtual machine. You can do that by doing the following: Right-click on the VM in the VirtualBox Manager, select "Show in Explorer" Please provide the relevant xml node that indicates which snapshot belongs to {2e933747-5235-41f1-8ba8-c6368a235243}.vhd – Ramhound Apr 6 at 14:38
1

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

Sources:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.