Page 1 of 1

help needed:repairing xml after a crash

Posted: 27. Jul 2009, 20:50
by dgraves
Hello all:

Here's the situation: I had a VM with 2 snapshots. Its state was shut down and saved. I was discarding a snapshot when the server lost power (it was on UPS, but this was a tantamount to someone having kicked the plug).

When I rebooted the host and started the vm, the system came back, unaltered and unharmed, however, the GUI console reports the machine as still shut down, and also reports the existence of a saved state (not really possible since its running).

I see inconsistencies in the two XML files which I believe I could repair. For instance, there is reference to a .sav file which appears not to be associated anymore with the running machine, save for its reference in the XML.

Question: if I correct the inconsistencies in the 2 XML files and verify that the LINK fields in each .vdi correctly link back all the way to the original .vdi, is there anything else I need to pay attention to in trying to put things square?

Here are my worries:

In the XML, I notice that there is a reference to stateFile which obviously isn't in use, considering the VM is running.
In the latest VDI (the one that is updating) I notice that "last snap" points to a non-existent UUID
In this same VDI I notice that the "parent" points to a non-existent UUID

I can remove the stateFile reference, but what about the "last snap" reference and "parent" references which point to non-existent UUID's?

Thanks and regards
Dave

Re: help needed:repairing xml after a crash

Posted: 28. Jul 2009, 02:18
by Perryg
Look in the VDI folder and see if you have a valid VDI file that you can use. If so try to create a new VM and attach that VDI and see if it has all of your work.
This will not recover you snapshots but if it is the final product then you are not at a total loss.

Re: help needed:repairing xml after a crash

Posted: 28. Jul 2009, 19:32
by Sasquatch
If you create a new VM, even if you don't attach a VDI to it, you can compare it to the broken XML file and fix the one you need. Or transfer some settings from the broken one to the working one, like your snapshots.