When creating a snapshot with 'VIR_DOMAIN_SNAPSHOT_CREATE_LIVE' the VM
is paused only after dumping the memory state.
This means that also the steps to do a 'manual' disk snapshot
(deactivation of the block nodes in qemu) must happen only once the VM
is paused.
Move the manual snapshot setup code after the memory snapshot code.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
}
}
- if (has_manual &&
- qemuSnapshotCreateActiveExternalDisksManual(vm, snap, VIR_ASYNC_JOB_SNAPSHOT) < 0)
- goto cleanup;
-
/* We need to collect reply from 'query-named-block-nodes' prior to the
* migration step as qemu deactivates bitmaps after migration so the result
* would be wrong */
/* the domain is now paused if a memory snapshot was requested */
+ if (has_manual &&
+ qemuSnapshotCreateActiveExternalDisksManual(vm, snap, VIR_ASYNC_JOB_SNAPSHOT) < 0)
+ goto cleanup;
+
if ((ret = qemuSnapshotCreateActiveExternalDisks(vm, snap,
blockNamedNodeData, flags,
VIR_ASYNC_JOB_SNAPSHOT)) < 0)