Page 1 of 1

corrupt VHD

Posted: 25. Sep 2012, 09:45
by zigzag
During deleting snapshot of virtual machine (with Linux Mint instalation and ext4 (maybe ext3, I'm not sure) partition) VirtualBox felt down and now I have problem with starting this machine. I suppose have broken virtual disk.
Is it some way to repair corrupted disk and start new machine (better variant) or at least join it to another machine?
thx

Image

Re: corrupt VHD

Posted: 25. Sep 2012, 11:18
by mpack
The VHD format is prone to this kind of failure, and for that reason should be avoided when possible. Deleting a snapshot would not have caused it, but running out of disk space while it was working would certainly do it.

So, first make sure you have lots of disk space free. Then I would try cloning the base VHD to VDI format. If VBoxManage doesn't work then you can try doing it with CloneVDI. If either succeeds then you should be able to build a new VM around the clone VDI. If neither works then I'm afraid the only thing that can save you is a backup.

I also suggest avoiding the use of snapshots in future, particularly if you have limited disk space.

Re: corrupt VHD

Posted: 26. Sep 2012, 09:34
by zigzag
Thx, but unfortunately, nor VBoxManage "clone hdd" command, nor CloneVDI, not helped. With cloned disk machine did not start.

Re: corrupt VHD

Posted: 26. Sep 2012, 11:57
by mpack
CloneVDI might have failed - did it? But if CloneVDI successfully created a clone at all, then it must be a working disk image. Any problems you have with the clone would be due to cloning the wrong disk (you must clone a snapshot, not the base VDI), or not configuring the new VM settings properly (the new VM must match the old VM - eg. you must not have a different IO APIC setting, nor switch from IDE to SATA hard disk controller).

Re: corrupt VHD

Posted: 1. Oct 2012, 08:48
by zigzag
I cloned base .VHD disk, but when I tried clone snapshot, CloneVDI show this:

Image


..and command VBoxManage.exe clonevm {c0399e8e-1040-4576-8cfb-50bed5c5edb5}.vhd return

VBoxManage.exe: error: Could not find a registered machine named {c0399e8e-1040-4576-8cfb-50bed5c5edb5
}.vhd'
VBoxManage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
VBoxManage.exe: error: Context: "FindMachine(Bstr(pszSrcName).raw(), srcMachine.asOutParam())" at line 422 of file VBoxManageMisc.cpp

Re: corrupt VHD

Posted: 1. Oct 2012, 11:19
by mpack
Hmm. The caption on that CloneVDI window you pictured is almost unreadable, but I think it says you are using CloneVDI v2.10 (and you craftily covered up the second version number indication too..). You might want to fix your color scheme.

The "Source is a difference image" error means that CloneVDI was unable to resolve the difference chain. I assume you tried the newest snapshot file? If yes then the next step would be to try older files. You should copy the base VHD into the same folder as the snapshots, just to ensure that CloneVDI is able to find it, then I would try again with each snapshot from newest to oldest, until you find one that works. If none work then I'm afraid that nothing else can be done.

Re: corrupt VHD

Posted: 3. Oct 2012, 13:27
by zigzag
I copied base .VHD file to the same folder as snaphot was and then CloneVDI proceeded and now my old virtual machine is working again. Thank you very very much for help.

Re: corrupt VHD

Posted: 3. Oct 2012, 14:34
by mpack
I'm glad that you got your data back.