]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: store qemu domain details in xml
authorEric Blake <eblake@redhat.com>
Sat, 13 Aug 2011 03:20:04 +0000 (21:20 -0600)
committerEric Blake <eblake@redhat.com>
Sat, 3 Sep 2011 14:27:07 +0000 (08:27 -0600)
commit973fcd8fd35ba1fac06f48c13a27e0ea086b5e17
tree20b42b535c22198b97282914049a2e8a2702ba31
parent2a95a3e976c32ca5634e7832a4bf9bb3b7afe5e2
snapshot: store qemu domain details in xml

When reverting to a snapshot, the inactive domain configuration
has to be rolled back to what it was at the time of the snapshot.
Additionally, if the VM is active and the snapshot was active,
this now adds a failure if the two configurations are ABI
incompatible, rather than risking qemu confusion.

A future patch will add a VIR_DOMAIN_SNAPSHOT_FORCE flag, which
will be required for two risky code paths - reverting to an
older snapshot that lacked full domain information, and reverting
from running to a live snapshot that requires starting a new qemu
process.  Any reverting that stops a running vm is also a form
of data loss (discarding the current running state to go back in
time), but as that is what reversion usually implies, it is
probably not worth requiring a force flag.

* src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML): Copy out
domain.
(qemuDomainSnapshotCreateXML, qemuDomainRevertToSnapshot): Perform
ABI compatibility checks.
src/qemu/qemu_driver.c