Dear all,
after a host (windows7) crash, my VM with Ubuntu can not boot anymore. The message I got is: "failed to open session " with the error "VERR_VD_VDI_INVALID_HEADER" . I tried to convert the vdi to raw and then to mount it in a fresh linux installation, in order to try at least to recover a couple of important files at which I was working... no success. Could you help me? Following discussions on this forum I attach to this post the first 2MB+1k of my corrupted vdi.
I hope that someone (mpack in particular) can give me good news since it is a two week job I'm going to loose.
Thanks in advance,
Gianluca
[Solved] Corrupted VDI after host crash: VERR_VD_VDI_INVALID_HEADER
[Solved] Corrupted VDI after host crash: VERR_VD_VDI_INVALID_HEADER
- Attachments
-
- corrupted.zip
- (21.01 KiB) Downloaded 131 times
Last edited by fotone123 on 24. Jun 2017, 19:32, edited 1 time in total.
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Corrupted VDI after host crash: VERR_VD_VDI_INVALID_HEADER
You should also have seen that I need the exact length of the VDI file, in bytes.
Re: Corrupted VDI after host crash: VERR_VD_VDI_INVALID_HEADER
Sorry! I forgot: 11.777.605.632 bytes .mpack wrote:You should also have seen that I need the exact length of the VDI file, in bytes.
Thanks,
Gianluca
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Corrupted VDI after host crash: VERR_VD_VDI_INVALID_HEADER
Ok, I have a recovery procedure for you. Please perform the following steps very carefully, because I am not there to look over your shoulder and correct you.
Incidentally, the hex editor I use is called frHed. I will assume that any other hex editor you use has the same capability as frHed.
And may I suggest that if your data is important to you then you should make proper backups to secondary storage every time you accumulate enough changes that you wouldn't enjoy losing it. You've already seen that the danger is not just theoretical, and I can only repair headers - I can't recover lost data.
Incidentally, the hex editor I use is called frHed. I will assume that any other hex editor you use has the same capability as frHed.
- First, back up your existing VDI, if you have not already done so. It is important that nothing we do here can make matters worse.
. - Next, use VirtualBox to create a new dynamic VDI which has a capacity of 20490MB exactly. You may find it convenient to create a new VM inside which you can create this VDI, however the VM is temporary and will never actually be used, so you don't need to spend any time on the VM settings.
. - Using FrHed, copy only the first 512 bytes from the new vdi to offset zero in the damaged vdi (i.e. overwrite the old damaged header). You can then close the "new VDI", this is no longer required.
. - Again using FrHed, edit the four bytes at offset 388 (0x184). These four bytes should currently be "00 00 00 00". Change them to be "DE 2B 00 00".
. - Save changes and exit FrHed. The VDI header should now be repaired.
.
And may I suggest that if your data is important to you then you should make proper backups to secondary storage every time you accumulate enough changes that you wouldn't enjoy losing it. You've already seen that the danger is not just theoretical, and I can only repair headers - I can't recover lost data.
Re: Corrupted VDI after host crash: VERR_VD_VDI_INVALID_HEADER
Thank you very much mpack!!!
I managed to recover the VM and all my files. I will follow your advice for the future: always backup important stuffs!
Thanks again, your help is very valuable!
ciao
Gianluca
I managed to recover the VM and all my files. I will follow your advice for the future: always backup important stuffs!
Thanks again, your help is very valuable!
ciao
Gianluca
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: [Solved] Corrupted VDI after host crash: VERR_VD_VDI_INVALID_HEADER
You're welcome, thanks for reporting back.
Re: [Solved] Corrupted VDI after host crash: VERR_VD_VDI_INVALID_HEADER
Since This reply will go to history then I would express my gratitute to mpack, Thanks for saving my only VDI wihch has been corrupted by power outage CRASH
VERR_VD_VDI_INVALID_HEADER
is really trouble some, however if you follow above tutorial by mpack, i think you will have a chance to restart the system.
This is what I have done:
1. Get a hex tool, any will do, I hv been using FREE HEX EDITOR NEO in this case and works very well
2. Create a BACKUP of the CORRUPTED VDI, and BACKUP of everything else
3. EDIT the HEX as per mpack tutorial above
4. Change the UUID of the VDI using CMD as ADMIN in virtualbox directory-> vboxmanage internalcommands sethduuid "YOUR VDI PATH"
5. Restart the system in virtualbox and hope for the best
in my case there hv been error of locked VDI, however please do not give up as you will find your answer in google.
MORAL OF THE STORY:
- VM IS GOOD, BUT PLEASE BACKUP ALL OF YOUR IMPORTANT DATA OUTSIDE VM EVERYDAY
And thats my story, this is not the only virtual machine error that I hv been dealing, and to all people who reading this forum, please do not give up upon restarting your VM
Thank you Mpack!
VERR_VD_VDI_INVALID_HEADER
is really trouble some, however if you follow above tutorial by mpack, i think you will have a chance to restart the system.
This is what I have done:
1. Get a hex tool, any will do, I hv been using FREE HEX EDITOR NEO in this case and works very well
2. Create a BACKUP of the CORRUPTED VDI, and BACKUP of everything else
3. EDIT the HEX as per mpack tutorial above
4. Change the UUID of the VDI using CMD as ADMIN in virtualbox directory-> vboxmanage internalcommands sethduuid "YOUR VDI PATH"
5. Restart the system in virtualbox and hope for the best
in my case there hv been error of locked VDI, however please do not give up as you will find your answer in google.
MORAL OF THE STORY:
- VM IS GOOD, BUT PLEASE BACKUP ALL OF YOUR IMPORTANT DATA OUTSIDE VM EVERYDAY
And thats my story, this is not the only virtual machine error that I hv been dealing, and to all people who reading this forum, please do not give up upon restarting your VM
Thank you Mpack!
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: [Solved] Corrupted VDI after host crash: VERR_VD_VDI_INVALID_HEADER
Well thanks for the compliments, but the above advice was specific to user fotone123. There is no chance of repairing anyone else's VDI by following that advice without modification. Attempting it would corrupt the VM further, and I find it hard to believe that the vdi would pass VirtualBox validation.
In any case my older advice is obsolete, since as of July 2017 the associated repair technique is now automated and built into CloneVDI (v3.0 and later).
In any case my older advice is obsolete, since as of July 2017 the associated repair technique is now automated and built into CloneVDI (v3.0 and later).