14

I suffered host crash when running guest OS with VirtualBox. Now the VM won't start and complain that:

Could not open them medium '[file.vmdk]` VMDK: inconsistency between grain table and backup grain table in '[file.vmdk]' (VERR_VD_VMDK_INVALID_HEADER).

VD: error VERR_VD_VMDK_INVALID_HEADER opening image file '[file.vmdk]' (VERR_VD_VMDK_INVALID_HEADER)

All I actually need is to get some files from this hard disk image. And also, any way to prevent this in future? One of my hosts that I need to work with is pretty unstable and tends to crash from time to time. I wouldn't like to go through this again.

12

Download the VDD kit from VMWare from here and run the following command: vmware-vdiskmanager -R <Path to vmdk file> This repaired my corrupt header which was caused by a power outage while the VM was running in Virtualbox.

  • I have the same error after a hard reset but after running the repair command I get "No errors were found on the virtual disk" Do you have any other ideas how to fix this? Thanks – user95227 Sep 21 '16 at 14:20
9

I had the same issue today. Solved it using vdiskmanager (Download link available in attachment section) and follow the instructions here.

Regards, HBK

  • When I run 1023856-vmware-vdiskmanager-linux.7.0.1 -R on the corrupt VMDK file, it doesn't return anything, but when I run it on the non-corrupt ones, it returns, saying they are not corrupt. This utility didn't fix my corrupt VMDK. – Geremia Oct 5 '17 at 14:53
  • Doesn't run on 64-bit Linux OS. The link gives a 32-bit LSB executable. – doughgle Oct 18 '17 at 13:46
2

For repair corrupted.vhd file use %Program Files%\Oracle\VirtualBox\VBoxManage.exe internalcommands repairhd "corrupted.vhd"

  • Did not work for me, while the vdiskmanager did the trick – Raffi Jun 13 '17 at 18:13
  • I had to use as is ahead VBoxManage.exe internalcommands repairhd corrupted_vdi_with_path.vdi -format VDI to be able to use the above command. However, this just lead to further info for the case to me - "..Error code VERR_VD_IMAGE_REPAIR_IMPOSSIBLE.." (Command references here - virtualbox.org/manual/ch08.html#vboxmanage-list) – parasrish Apr 9 '18 at 4:22
0

I managed to fix the corrupt header using Virtual Disk Development Kit from vmware. This post about mounting disk image led me to the vddk.

vmware-manager.exe allows you to fix the image file. It worked for me, as I was able to launch the VM, however files I needed were corrupt anyway.

-1

A much easier way to fix this error that required no external tools.

From the main window of the Oracle VM VirtualBox Manager, select the VM that won't start. Click on Snapshots in upper right. Select the second-last entry (since presumably the last one is corrupted, and the previous one is healthy). Right-click on it and choose Restore (I didn't see a point to creating a snapshot of the current VM state, since it's buggered). Done

protected by Community Jan 15 at 17:10

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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