Page 1 of 1
VDI with a corrupted header
Posted: 16. Oct 2020, 19:53
by itsme300
I've a corrupted vdi header and vm does not boot
I tried to copy 512 bytes from a new vdi to the corrupted vdi but end up with UUID issue as I missed to release and remove the corrupted vdi in virtual box
virtual box version - 6.1.12
vdi size - 852 GB (915,260,047,360 bytes)
attached the 2MB+ hex data (2098176 bytes)
Re: VDI with a corrupted header
Posted: 16. Oct 2020, 20:09
by scottgus1
Mpack's
CloneVDI can try to repair corrupted headers. If CloneVDI can't do it, then you'll have to rely on your backups.
Re: VDI with a corrupted header
Posted: 16. Oct 2020, 20:23
by itsme300
clone vdi says "source file corrupt - block map contains errors
Re: VDI with a corrupted header
Posted: 16. Oct 2020, 20:26
by scottgus1
If the CloneVDI instructions have no way forward, then your VDI is toast. You can wait for Mpack to come by, he might have further ideas.
Re: VDI with a corrupted header
Posted: 16. Oct 2020, 21:40
by itsme300
Please mark this as solved as I had a typo while created a new vdi(I had entered 825 instead of 852).
I came to know this after fsck reported a mismatch in size. Apologies for my mistake.
Mpack's manual solution works for me

Re: VDI with a corrupted header
Posted: 23. Oct 2020, 14:04
by mpack
Just to follow up on this. I had a look at the header even though CloneVDI is perfectly capable of analysing it correctly. Unfortunately it looks like, unusually, the original VDI is greater than 256GB capacity, and therefore the normal "2MB and change" diagnostic data is not correct in this case. The diagnostic file needs to grow by 1MB for every additional 256GB of VDI capacity.
Or not. If the file is repairable then CloneVDI will offer you a Repair button, even if it reports an error. If CloneVDI does not offer a repair button then the VDI cannot be repaired, because the problem is not confined to the header. Usually this means that the block map is doing things that can't be fixed, e.g. referencing the same block multiple times, or is referencing blocks that don't exist, perhaps because the VDI was truncated.