error VDI: invalid pre-header - VERR_VD_VDI_INVALID_HEADER opening image file

Discussions related to using VirtualBox on Windows hosts.
Post Reply
pedromiguel
Posts: 3
Joined: 14. Feb 2021, 15:19

error VDI: invalid pre-header - VERR_VD_VDI_INVALID_HEADER opening image file

Post by pedromiguel »

Dear Oracle community,
I'm having a real big trouble recovering / loading / opening vdi medium file on virtualbox manager. This file was recovered right before a disk wipe-out. I'm asking if anyone can help me at least find way to recover some of the files inside this vdi file or even if possible to restore the linux guest medium at all. Here is the output errors and info about the file/system:
Failed to open a session for the virtual machine IONGNSS.
Could not open the medium 'C:\Users\epedr\VirtualBox VMs\IONGNSS\IONGNSS_1.vdi'.
VDI: invalid pre-header in 'C:\Users\epedr\VirtualBox VMs\IONGNSS\IONGNSS_1.vdi' (VERR_VD_VDI_INVALID_HEADER).
VD: error VERR_VD_VDI_INVALID_HEADER opening image file 'C:\Users\epedr\VirtualBox VMs\IONGNSS\IONGNSS_1.vdi' (VERR_VD_VDI_INVALID_HEADER).
Result Code: E_FAIL (0x80004005)
Component: MediumWrap
Interface: IMedium {ad47ad09-787b-44ab-b343-a082a3f2dfb1}
I would post printscreen errors and info if i had permission to post urls, but because i'm new here I can't do it for now. I'm just going to quote errors:

Files in VM folder:

Directory of C:\Users\epedr\VirtualBox VMs\IONGNSS
14/02/2021 13:04 <DIR> .
14/02/2021 13:04 <DIR> ..
14/02/2021 13:04 6 454 IONGNSS.vbox
13/02/2021 16:54 6 454 IONGNSS.vbox-prev
13/01/2021 02:12 39 450 574 848 IONGNSS_1.vdi
14/02/2021 13:04 <DIR> Logs
3 File(s) 39 450 587 756 bytes
3 Dir(s) 247 754 063 872 bytes free
Repair attempt with: VBoxManage internalcommands repairhd
C:\Users\epedr\VirtualBox VMs\IONGNSS>VBoxManage internalcommands repairhd IONGNSS_1.vdi -format VDI
VBoxManage.exe: error: VDI: invalid pre-header in 'IONGNSS_1.vdi'
VBoxManage.exe: error: Error code VERR_VD_IMAGE_REPAIR_IMPOSSIBLE at F:\tinderbox\win-6.1\src\VBox\Storage\VDI.cpp(2943) in function int __cdecl vdiRepair(const char *,struct VDINTERFACE *,struct VDINTERFACE *,unsigned int)
VBoxManage internalcommands dumphdinfo:
C:\Users\epedr\VirtualBox VMs\IONGNSS>VBoxManage internalcommands dumphdinfo IONGNSS_1.vdi
VBoxManage.exe: error: Format autodetect failed: VERR_NOT_SUPPORTED
Convertion to raw attempt: VBoxManage internalcommands converttoraw
C:\Users\epedr\VirtualBox VMs\IONGNSS>VBoxManage internalcommands converttoraw -format VDI IONGNSS_1.vdi rescue_raw
VBoxManage.exe: error: VDI: invalid pre-header in 'IONGNSS_1.vdi'
VBoxManage.exe: error: Error code VERR_VD_VDI_INVALID_HEADER at F:\tinderbox\win-6.1\src\VBox\Storage\VDI.cpp(889) in function int __cdecl vdiImageReadHeader(struct VDIIMAGEDESC *)
VBoxManage.exe: error: VD: error VERR_VD_VDI_INVALID_HEADER opening image file 'IONGNSS_1.vdi'
VBoxManage.exe: error: Error code VERR_VD_VDI_INVALID_HEADER at F:\tinderbox\win-6.1\src\VBox\Storage\VD.cpp(5762) in function int __cdecl VDOpen(struct VDISK *,const char *,const char *,unsigned int,struct VDINTERFACE *)
VBoxManage.exe: error: Cannot open the source image: VERR_VD_VDI_INVALID_HEADER
VBoxManage internalcommands converthd
C:\Users\epedr\VirtualBox VMs\IONGNSS>VBoxManage internalcommands converthd -srcformat VDI -dstformat -RAW IONGNSS_1.vdi rescue.raw
VBoxManage.exe: error: VDI: invalid pre-header in 'IONGNSS_1.vdi'
VBoxManage.exe: error: Error code VERR_VD_VDI_INVALID_HEADER at F:\tinderbox\win-6.1\src\VBox\Storage\VDI.cpp(889) in function int __cdecl vdiImageReadHeader(struct VDIIMAGEDESC *)
VBoxManage.exe: error: VD: error VERR_VD_VDI_INVALID_HEADER opening image file 'IONGNSS_1.vdi'
VBoxManage.exe: error: Error code VERR_VD_VDI_INVALID_HEADER at F:\tinderbox\win-6.1\src\VBox\Storage\VD.cpp(5762) in function int __cdecl VDOpen(struct VDISK *,const char *,const char *,unsigned int,struct VDINTERFACE *)
VBoxManage.exe: error: Cannot open the source image: VERR_VD_VDI_INVALID_HEADER
What more can I do? Can anyone please help me?
Thank you
Pedro
pedromiguel
Posts: 3
Joined: 14. Feb 2021, 15:19

Re: error VDI: invalid pre-header - VERR_VD_VDI_INVALID_HEADER opening image file

Post by pedromiguel »

Well, digging a more in the community forum I've find that my file is busted (?),

first hex lines of the vdi file
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
last lines
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
doom :shock:

The Log files have a lot of information that I really can't quote here.
I think i'm really done :( :( :(
Thank you anyway if already anyone was trying to help me.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: error VDI: invalid pre-header - VERR_VD_VDI_INVALID_HEADER opening image file

Post by mpack »

I'm rather disturbed by your use of the phrase "the file was recovered". That sounds suspiciously like you used a snake oil tool to recover a deleted file. If so then the file is garbage and you won't get anything from it.

If that is not what we're talking about then try cloning the VDI using CloneVDI. CloneVDI will detect the corruption. If the corruption can be repaired then CloneVDI will offer a "repair" button. If no such button is offered then the file is almost certainly 100% garbage, so you'd be just as likely to recover your data from an equal sized file of random numbers (which is what the snake oil recovery tools give you).
pedromiguel
Posts: 3
Joined: 14. Feb 2021, 15:19

Re: error VDI: invalid pre-header - VERR_VD_VDI_INVALID_HEADER opening image file

Post by pedromiguel »

Well, the file is corrupt, no way to repair / fix it usin cloneVDI (is total garbage, the hex reading of the file is only zeros, I really don't understand how that happen (i had to replace new memory rams when the disk was cleaned-out). I recovered/copy the files using systemrescue tools at the time.
thanks anyway
Post Reply