Page 1 of 1

Need help extract files from my .vdi file

Posted: 25. Jul 2008, 03:24
by dati
Hello,

I am running into a very serious problem.

Here is my Configuration
- Virtualbox v1.6.2 on Windows Vista.
- Windows XP SP3 as Client in the Virtual Box.

When I try to open my vm machine I get an error message:
------------------------------------------------------------------
VM cannot start because the hard disk 'Q:\VPC\VirtualBox.vdi' is not accessible (Could not access har disk image 'Q:\VPC\VirtualBox.vdi' (VERR_VDI_INVALID_HEADER)).

Result Code: E_FAIL (0x80004005)
Component: Console
Interface: IConsole {d5a1cbda-f5d7-4824-9afe-d640c94c7dcf}

------------------------------------------------------------------

Does anyone know how to revise my vdi file?
Can files store on the vdi file be extracted?
Any pre-release hot fix/tools?

I have try vboxmanage clonevd ... but still get the same error message:
Could not access hard disk mage ... (VERR_VDI_INVALID_HEADER)

Please Help!, Very Urgent.

Thanks in Advance.

VBoxManage showvdiinfo

Posted: 25. Jul 2008, 04:42
by dati
I have issue the following command from command line:
VBoxManage.exe showvdiinfo Q:\VPC\VirtualBox.vdi

Result:
VirtualBox Command Line Management Interface Version 1.6.2
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

UUID: 63469d35-1d70-4615-995f-c6a3e4f359db
Registered: yes
Accessible: no
Access Error: Could not access hard disk image 'Q:\VPC\VirtualBox.vdi' (VERR_VDI_INVALID_HEADER)
Size: 0 MBytes
Current size on disk: 0 MBytes

Type: standard
Storage type: Virtual Disk Image (VDI)
In use by VM: 1e8b4e24-2691-4518-bb85-dc5b818e0bfc
Path: Q:\VPC\VirtualBox.vdi

Posted: 21. Nov 2008, 18:30
by ramzez
i have the same problem , but my file size is ok

Re: Need help extract files from my .vdi file

Posted: 18. Oct 2011, 21:04
by niels762
first you need to convert your VDI file into an VHD.
step 1
go to file left and select Manager for virtual media.

step 2
select your VDI file and press copy and then next.

Step 3
select VHD (virtual Hard Disk).

Step 4
choose dynamically allocated or fixed size.

Step 5
select your location.

step 6
press Copy

Step 7
unpack the VHD file with 7-zip or another unpack program

BTW sorry for my bad english, im dutch

Re: Need help extract files from my .vdi file

Posted: 19. Oct 2011, 13:16
by mpack
If the VDI is unusable then conversion to VHD is impossible.

Anyway, does 7-zip support VHD format? There's a substantial difference between an archive format and a virtual disk format, especially one containing a complex, proprietary and officially undocumented filesystem. That's a lot of bloat to add to an archiving tool.

Re: Need help extract files from my .vdi file

Posted: 19. Oct 2011, 15:18
by Leak
Funny you should ask - I didn't believe it either (although most packers nowadays at least support ISO files), but sure enough 7-Zip (both it's file manager and the command line version) does support reading NTFS, either right off of a partition (type "\\." into 7-Zip's address bar) or from within a VHD file...

(It even allows you to read deleted files that haven't been overwritten yet, as well as read any file without regards to security descriptors... gotta remember that...)

Re: Need help extract files from my .vdi file

Posted: 19. Oct 2011, 16:45
by mpack
Is it write capable? I.e. does it allow you to copy files in, perhaps overwriting an existing file? If so then that would provide a handy means of e.g. replacing a device driver in a VM that won't boot. Ability to delete files would also be useful for that.

ISTM also that if 7-zip can support the VHD container format then it could easily support VDI as well. It's the NTFS support that's the tricky bit.

Of course this isn't a general solution: the OP asked this question in "Using VirtualBox", not "Windows Guests", so a full answer must give consideration to VDI files which contain non-Windows filesystems.

Re: Need help extract files from my .vdi file

Posted: 19. Oct 2011, 19:15
by vbox4me2
Gizmo seems to be able to access vhd files, and I've seen a request there for vdi support so who knows what else is out there we don't know about yet.

Re: Need help extract files from my .vdi file

Posted: 19. Oct 2011, 20:43
by Leak
mpack wrote:Is it write capable? I.e. does it allow you to copy files in, perhaps overwriting an existing file?
I'm afraid not - it's listed under "Unpacking only" - taking a peek at the source 7-Zip treats images (ISO, VHD, WIM, ...) like an archive that contains another archive (NTFS, FAT, UDF, ISO9660, ...), similar to .tar.gz, so adding VDI support shouldn't be too hard...

Re: Need help extract files from my .vdi file

Posted: 25. Oct 2011, 15:48
by niels762
srry forgot something
step 8
unpack/open 1.ntfs with 7-zip or another unpack program