• E
    snapshot: rudimentary qemu support for atomic disk snapshot · 4c4cc1b9
    Eric Blake 提交于
    Taking an external snapshot of just one disk is atomic, without having
    to pause and resume the VM.  This also paves the way for later patches
    to interact with the new qemu 'transaction' monitor command.
    
    The various scenarios when requesting atomic are:
    online, 1 disk, old qemu - safe, allowed by this patch
    online, more than 1 disk, old qemu - failure, this patch
    offline snapshot - safe, once a future patch implements offline disk snapshot
    online, 1 or more disks, new qemu - safe, once future patch uses transaction
    
    Taking an online system checkpoint snapshot is atomic, since it is
    done via a single 'savevm' monitor command.  Taking an offline system
    checkpoint snapshot is atomic, thanks to the previous patch.
    
    * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateXML): Support
    new flag for single-disk setups.
    (qemuDomainSnapshotDiskPrepare): Check for atomic here.
    (qemuDomainSnapshotCreateDiskActive): Skip pausing the VM when
    atomic supported.
    (qemuDomainSnapshotIsAllowed): Use bool instead of int.
    4c4cc1b9
qemu_driver.c 400.9 KB