VDI / VHD Repair Tool

Here you can provide suggestions on how to improve the product, website, etc.

Re: VDI / VHD Repair Tool

Postby ProVega » 6. Nov 2009, 19:49

Should be fixed in 3.0.10. We were indeed updating the footer in a lazy way. If the VM process crashed (which shouldn't happen in the first place), the VHD could be left in an inconsistent state


Awesome. This should go a long way to reducing disk corruption if the host machine/process dies.

:D

Thank you!
ProVega
 
Posts: 8
Joined: 3. Sep 2009, 22:39
Primary OS: MS Windows 2008
VBox Version: OSE Debian
Guest OSses: Windows Server 2003 R2

Re: VDI / VHD Repair Tool

Postby mpack » 6. Nov 2009, 23:22

ProVega wrote:This should go a long way to reducing disk corruption if the host machine/process dies

Or if you simply have the VHD on an external drive, and forget to shut down the VM before unplugging the drive.
mpack
Volunteer
 
Posts: 957
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VDI / VHD Repair Tool

Postby longwa » 8. Nov 2009, 20:55

I understand that 3.0.10 fixed the root problem, is there any way to fix a drive that was affected by this problem? I have a VHD that failed due to the INVALID HEADER issue but I still can't mount it in 3.0.10. I was hoping maybe 3.0.10 would be able to do a check on the drive and fix the header before mounting the volume. I also can't access the drive by mounting it directly from Windows.

Any way to repair the drive or am I just screwed?
longwa
 
Posts: 3
Joined: 8. Nov 2009, 20:52
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: VDI / VHD Repair Tool

Postby mpack » 8. Nov 2009, 21:21

longwa wrote:Any way to repair the drive or am I just screwed?

You can try my CloneVDI tool, which may be able to convert it to a usable VDI - I have a vague notion that my code will use the "backup footer" (AKA the header) if that is still intact. I offer no guarantees however that this will work.

I suggest you use the "Keep UUID" option. You can then either use the VDI from now on or, if you haven't learned your lesson about VHDs yet, you can use VBoxManage to convert it back into a VHD.

But, do let me know if it does work.
mpack
Volunteer
 
Posts: 957
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VDI / VHD Repair Tool

Postby longwa » 10. Nov 2009, 00:25

Unfortunately, it didn't fix the problem. It did convert the image to VDI successfully, but I get an error trying to import the drive:

Result Code:
E_INVALIDARG (0x80070057)
Component:
VirtualBox
Interface:
IVirtualBox {3f4ab53a-199b-4526-a91a-93ff62e456b8}

I had no idea using a VHD was a ticking timebomb for destroying my VM. I'm glad they fixed it so quickly, but it's still a huge blow to my confidence in VB.
longwa
 
Posts: 3
Joined: 8. Nov 2009, 20:52
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: VDI / VHD Repair Tool

Postby mpack » 10. Nov 2009, 11:50

By "import the drive", I assume you mean registering the VDI in "File | Virtual Media Manager".

As a wild guess I'd say that the "invalid argument" is the drive UUID. If you chose the keepuuid option in CloneVDI then that's ok, but VBox will not allow you to register two virtual disks with the same UUID, so you need to unregister the VHD first. If you want to keep both then they need to have different UUIDs.

When I said "not guaranteed to work" I had in mind something rather more serious than getting the VDI registered (it's a valid VDI, so VBox should accept it). The bigger problem is that we are assuming there will be some discrepency between the disk image and the header, hence it's possible there will be lost files, lost data etc. Do a disk check once you get it to mount. Plus of course CloneVDI knows nothing about snapshots.

You can't blame the VBox team for the poor design of VHD, because they did not design it. They merely added support for it for the benefit of people like you who choose to use it. The issue with lazy updates of the footer was an understandable oversight, but all it did was exaggerate a problem which is inherent in VHD.
mpack
Volunteer
 
Posts: 957
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VDI / VHD Repair Tool

Postby longwa » 11. Nov 2009, 23:48

You are right, didn't realize that I had to remove the prior drive from the Media Manager before I could import another one with the same UUID. Now that I have the VDI copy imported, I can start the VM, but as you say, the disk is corrupt. I immediately get a Disk Read Error. At least now I can approach it as a bad guest disk and try using the recovery console to make the disk bootable again.

Thanks again for the help.
longwa
 
Posts: 3
Joined: 8. Nov 2009, 20:52
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Previous

Return to Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests