How to recreate VM XML config (after crash) from VDI UUIDs?

This is for discussing general topics about how to use VirtualBox.
Post Reply
shadowdemon
Posts: 9
Joined: 21. Jun 2009, 12:58
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, winxp
Location: Germany

How to recreate VM XML config (after crash) from VDI UUIDs?

Post by shadowdemon »

OK, I am running the newest VB under Linux host. I have a Linux VM, with one snapshot. After configuring it for about a week, I finally got to where I wanted, and thought it was time to make a new snapshot, so that I wouldn't run the risk of loosing my work of the last week. That's where the trouble is: the snapshot creation failed, with some error message I couldn't understand (I find VB error messages generally very hard to decipher, because they use those UUID that don't mean anything to a human being). Anyway, it seems that VB made snapshots of the (two) VDIs (as I can see them in the Snapshots directory), but then didn't update the VM XML configuration file. Now it says that something is wrong with the VM, so I cannot use it anymore. How am I meant to manually create the missing "Snapshot" section?!? :?

For starters, what about the snapshot UUID itself? Can I find it somewhere, or can I invent a new one?

Am I right to assume that the data outside the snapshot section is the configuration of the VM at the time the first snapshot was made, and therefore the data inside the snapshot section is the configuration just before I tried to create the second snapshot?

Does the second snapshot section goes before, after, or in the first snapshot section?

Is the timestamp important, as don't know exactly when I clicked the snapshot button?

Is there some detailed guide somewhere that shows how to do this? (I searched for it but found nothing. Maybe I used the wrong terms).
shadowdemon
Posts: 9
Joined: 21. Jun 2009, 12:58
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, winxp
Location: Germany

Re: How to recreate VM XML config (after crash) from VDI UUIDs?

Post by shadowdemon »

OK, I compared the VDI UUIDs, and the UUID of the original VDI is inside the snapshot section, while the UUID of the snapshot VDI is outside the snapshot section. That makes no sense to me. :shock: I would be very grateful to anyone who can explain this.
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: How to recreate VM XML config (after crash) from VDI UUIDs?

Post by mpack »

You are thinking of the child vdi as the snapshot. It isn't. Think of what the word "snapshot" means: i.e. it's an informal term for a photograph, and photographs tell you the state of things as they were in the past, not how they are in the present.

Hence the snapshot section of the XML records the state of things at the time the snapshot was taken, which includes the UUID of the old disk. The current state VDI (which you are obviously assuming is the snapshot) stores all the changes since that last snapshot.
Post Reply