How to deal with an unloadable VHD?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
UnitedWallabies
Posts: 12
Joined: 31. Jul 2019, 18:47

How to deal with an unloadable VHD?

Post by UnitedWallabies »

My main VM (FreeBSD), on a Windows-10 host, has three "disks" configured:

Code: Select all

        <HardDisk uuid="{9595d615-ce93-4593-b48d-1709f97947f7}" location="meow0.vhd" format="VHD" type="Normal"/>
        <HardDisk uuid="{920b7eb3-c53e-4caf-8b78-bcaf7a36477f}" location="meow2.vhd" format="VHD" type="Normal"/>
        <HardDisk uuid="{6708a532-4784-42e4-8611-b5d7c31bec6e}" location="swap.vdi" format="VDI" type="Normal"/>
Since December I had Windows back all three images up to a network drive. On Sunday, the host's drive died and, after getting a new machine, I'm trying to recover the VM.

Two of the images (swap.vdi and meow2.vhd) recovered without a problem. The primary one -- meow0.vhd -- is being rejected by VirtualBox. It is listed as "Inaccessible" in the GUI and, if I try to use it, I get this error:
Failed to open the disk image file C:\VHDs\misha0.vhd.

Could not get the storage format of the medium 'C:\VHDs\meow0.vhd' (VERR_NOT_SUPPORTED).

Result Code: VBOX_E_IPRT_ERROR (0x80BB0005)
Component: MediumWrap
Interface: IMedium {ad47ad09-787b-44ab-b343-a082a3f2dfb1}
Callee: IVirtualBox {d0a0163f-e254-4e5b-a1f2-011cf991c38d}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)
I'd blame file-corruption, but all of the earlier versions of the same image (and I have about 15 in the backup) are being rejected too -- so I suspect the rejection is not quite valid...

Is there a way to force the use of a VHD? Can it be repaired somehow, perhaps?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to deal with an unloadable VHD?

Post by scottgus1 »

That error means that Virtualbox cannot understand the format of the file, in other words, the vhd's bunged.

Were the backups FC file-compared or decent-strength hashed to confirm backup integrity?
UnitedWallabies wrote:all of the earlier versions of the same image (and I have about 15 in the backup) are being rejected too
If there was something wrong in he backup routine, this could happen.

Try Mpack's CloneVDI on it. If CloneVDI can clone it, use the VDI clone instead. If CloneVDI cannot clone it, it's no good.
UnitedWallabies
Posts: 12
Joined: 31. Jul 2019, 18:47

Re: How to deal with an unloadable VHD?

Post by UnitedWallabies »

scottgus1 wrote:Were the backups FC file-compared or decent-strength hashed to confirm backup integrity?
No. I was using the Backup functionality built into Windows. Was it too much to expect that to work -- at least, most of the time? I guess, it was...
scottgus1 wrote:Try Mpack's CloneVDI on it. If CloneVDI can clone it, use the VDI clone instead. If CloneVDI cannot clone it, it's no good.
Thanks for the pointer. Unfortunately, the utility states "Source file is not a recognized VHD file format". Perhaps, it can be forced to try its best anyway? Somehow?

I'm using VBox-6.1.22 now, but the old machine had an older version. Could it have created a VHD, that the new version is not recognizing?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to deal with an unloadable VHD?

Post by scottgus1 »

We would not have anything else. You could try Microsoft. VHD being their format, they may have a fixing tool.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to deal with an unloadable VHD?

Post by mpack »

It's more than likely not a VHD at all. If you were to use a hex editor to save off the first 4k (say) of the binary, then zip it and attach the zip here, then we'd soon be able to tell.

Note: we already know that it's not a valid VHD. The point is to check if it could actually be a valid something else, renamed.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: How to deal with an unloadable VHD?

Post by fth0 »

Did you create the backups while the VM was running?

Did you rename the VHD files to obfuscate them in this forum thread? If yes, you didn't succeed. ;)
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to deal with an unloadable VHD?

Post by mpack »

fth0 wrote:Did you create the backups while the VM was running?
That wouldn't stop CloneVDI from recognizing it as a VHD. Unlike VirtualBox, CloneVDI does not attempt to verify the VHD footer. If the header is intact then that's all CloneVDI needs.
Post Reply