On 07/05/2011 11:20 AM, sethuraman subbiah wrote: > Hi Eric, [your mailer is not wrapping long lines, which is making this harder for me to reply to; also, top-posting is not the preferred behavior on this list] > > I tried editing the xml in statefile ... > I think libvirt (qemu-driver) saves the length of the xml file along with its header, Exactly. This is the case, and if you alter the length of the embedded xml, you must also update the binary position that encodes the length of the embedded xml. You ended up invalidating the state file. Libvirt should probably do a better job at erroring out rather than booting from scratch when it detects a corrupted state file, but it also lends credence to my argument that libvirt should provide an API that makes it possible to edit the XML embedded within a system checkpoint state file. [P.S. At this point, we have to be careful with terminology. The qemu developers are introducing 'snapshot' commands which save the state of just a disk image, whereas their 'savevm' monitor command creates a 'checkpoint', or combination of memory and disk state used to restore a running VM from that checkpoint - what you called a statefile. So it can be a bit confusing that libvirt's current virDomainSnapshot API manages checkpoints, although I hope to enhance it to also handle snapshots.] -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature