Page 1 of 1

getting a VERR_VD_VDI_INVALID_HEADER error on for the vdi

Posted: 28. Jul 2009, 23:39
by pengrath
Running a Windows XP virtual machine and shut it down because it was running slow.
when I tried to open it back up again it gave this error.
Failed to start the virtual machine win_xp.

Medium '/home/tanglin/.VirtualBox/HardDisks/win_xp.vdi' is not accessible.
Could not open the hard disk '/home/tanglin/.VirtualBox/HardDisks/win_xp.vdi'.

VDI: invalid header in '/home/tanglin/.VirtualBox/HardDisks/win_xp.vdi' (VERR_VD_VDI_INVALID_HEADER).

VD: error opening image file '/home/tanglin/.VirtualBox/HardDisks/win_xp.vdi' (VERR_VD_VDI_INVALID_HEADER).
I've tried everything I could find in the VBoxManage tool but without the header information the tool is useless.
In any case I found a description of the header format, but the chances of fixing it by editing the header manually are slim.

Is there any possible way to fix this? any help would be greatly appreciated.

Re: getting a VERR_VD_VDI_INVALID_HEADER error on for the vdi

Posted: 3. Aug 2009, 22:12
by vbox4me2
You could try dumping the vdi as raw to external storage and then run some disk repair tool.

Re: getting a VERR_VD_VDI_INVALID_HEADER error on for the vdi

Posted: 7. Aug 2009, 21:36
by pengrath
Thank you, thats what I did and was able to retrieve the data, but was unable to recover the partition table information. I was using the "ubuntu rescue remix" disk to get the information off of the VDI.

Re: getting a VERR_VD_VDI_INVALID_HEADER error on for the vdi

Posted: 1. Feb 2011, 14:49
by farandwee
vbox4me2 wrote:You could try dumping the vdi as raw to external storage and then run some disk repair tool.
Hi,

How do I dump the vdi as raw? Would that be the command below?

vboxmanage clonehd ubuntu.vdi ubunturaw.img --format RAW

Thanks,
Fara

Re: getting a VERR_VD_VDI_INVALID_HEADER error on for the vdi

Posted: 1. Feb 2011, 16:16
by mpack
Red herring: old thread, and I'm afraid the advice was incorrect anyway. Corruption of the guest MBR or filesystem can't cause VBox to error out when opening the VDI (the former error is in virtual space, the latter is physical). The only thing that could cause the error described by the OP is a sharing violation or actual corruption of the VDI header - both are host problems. Some temporary sharing violations (e.g. the kind that are a result of a software error) can be cured by rebooting the host.

Finally, to answer your question directly: the VBoxManage command you propose can't work if VBox rejects the VDI file, which was the OPs original error. In fact there is no way I can think of to generate a raw file if the physical VDI is unreadable. If you simply want to make a raw copy of a working VDI then yes, that command would work. Can't imagine why you'd want to do it though!