Need help extract files from my .vdi file

This is for discussing general topics about how to use VirtualBox.
Post Reply
dati
Posts: 12
Joined: 4. Jul 2008, 15:26

Need help extract files from my .vdi file

Post 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.
dati
Posts: 12
Joined: 4. Jul 2008, 15:26

VBoxManage showvdiinfo

Post 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
ramzez
Posts: 19
Joined: 23. Jun 2008, 23:39

Post by ramzez »

i have the same problem , but my file size is ok
niels762
Posts: 2
Joined: 18. Oct 2011, 20:55
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: 4.1.4

Re: Need help extract files from my .vdi file

Post 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
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: Need help extract files from my .vdi file

Post 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.
Leak
Posts: 242
Joined: 31. Mar 2009, 13:00
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Testing, Windows XP, Windows Server 2003/2008 R2

Re: Need help extract files from my .vdi file

Post 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...)
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: Need help extract files from my .vdi file

Post 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.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Need help extract files from my .vdi file

Post 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.
Leak
Posts: 242
Joined: 31. Mar 2009, 13:00
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Testing, Windows XP, Windows Server 2003/2008 R2

Re: Need help extract files from my .vdi file

Post 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...
niels762
Posts: 2
Joined: 18. Oct 2011, 20:55
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: 4.1.4

Re: Need help extract files from my .vdi file

Post by niels762 »

srry forgot something
step 8
unpack/open 1.ntfs with 7-zip or another unpack program
Post Reply