• E
    snapshot: store qemu domain details in xml · 973fcd8f
    Eric Blake 提交于
    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.
    973fcd8f
qemu_driver.c 312.2 KB