Base hard disk attached to wrong differencing disk UUID

This is for discussing general topics about how to use VirtualBox.
Post Reply
danguyf
Posts: 2
Joined: 20. Feb 2016, 06:08

Base hard disk attached to wrong differencing disk UUID

Post by danguyf »

I cloned a disk with CloneVDI to increase the size, failed to tell it to use the same UUID, renamed the old base VDI file and dropped the large clone in its place. I tried to start it up and VirtualBox complained of a UUID mis-match, so instead I removed the the original and added the new one and tried to start it up.

The cloned disk does not appear to have merged the differencing disk. When I boot it up it thinks it's 2014 and all of my files since then are absent.

I tried to re-add the original VDI and remove the new one and it created a new differencing disk, so now it's booting up in 2014 too.

The differencing disk VDI from before I began all of this idiocy is still there in the snapshots directory with a different UUID. How can I tell VirtualBox to use that UUID rather than the new one?

tl;dr: I am an idiot; please save me from myself.
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: Base hard disk attached to wrong differencing disk UUID

Post by mpack »

You cloned the wrong disk. Cloning the base disk gives you a clone of the base disk. Cloning the first snapshot gives you a merge of base plus first snapshot (links point backwards in time, not forwards). Cloning second snapshot gives you a merge... well, you can see how it goes. This information is in the CloneVDI release notes, it's such a shame that you didn't read it.

Everything you did after encountering the first error was doing further damage to the VM. Dare I ask whether you made any backups before you attempted major surgery on the VM? Should I assume not?

Recovery: this is not guaranteed to work, because I'm not sure how much damage you did to the files. Anyway, copy all VDIs (including all snapshots and the original base) into a single folder. Identify the newest snapshot VDI (not the new one you mentioned creating), and clone it with CloneVDI. Build a new VM around the clone VDI. You should never, EVER, drop a clone into an existing snapshot chain, even if you did remember to preserve the UUID. There's a lot more to it than that.
danguyf
Posts: 2
Joined: 20. Feb 2016, 06:08

Re: Base hard disk attached to wrong differencing disk UUID

Post by danguyf »

Thank you. Copying the base and differencing disk VDI files into a new directory and cloning the latter did, indeed, do the trick.

I'm going to be much more cautious in the future.
Post Reply