]> git.ipfire.org Git - thirdparty/libvirt.git/commit
save: support qemu modifying xml on domain save/restore
authorEric Blake <eblake@redhat.com>
Mon, 18 Jul 2011 23:27:59 +0000 (17:27 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 28 Jul 2011 21:31:08 +0000 (15:31 -0600)
commit0ea479f8f6faeb59a47cf2e9de336e51b52e3f65
tree400fa9916fbe391aef66fd2a86205bd11783d232
parentff81956ac68e0d72858b8391670e7f3a02d01ade
save: support qemu modifying xml on domain save/restore

With this, it is possible to update the path to a disk backing
image on either the save or restore action, without having to
binary edit the XML embedded in the state file.

This also modifies virDomainSave to output a smaller xml (only
the inactive xml, which is all the more virDomainRestore parses),
while still guaranteeing padding for most typical abi-compatible
xml replacements, necessary so that the next patch for
virDomainSaveImageDefineXML will not cause unnecessary
modifications to the save image file.

* src/qemu/qemu_driver.c (qemuDomainSaveInternal): Add parameter,
only use inactive state, and guarantee padding.
(qemuDomainSaveImageOpen): Add parameter.
(qemuDomainSaveFlags, qemuDomainManagedSave)
(qemuDomainRestoreFlags, qemuDomainObjRestore): Update callers.
src/qemu/qemu_driver.c