mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
qemuSnapshotPrepare: Prohibit 'manual' disk snapshot mode with VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag
If the snapshot has a disk using 'manual' snapshot mode we keep the VM paused until the user resumes it (presumably after they've done steps to take the disk snapshot). Since quiescing is done via the guest agent this means it will not be possible while the VM is paused. Rather than trying to implement complex recovery from this state prevent the use of VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE for the snapshot. The user still can call virDomainFSFreeze/virDomainFSThaw manually. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
1 parent
627bcc8525
commit
7c0778deb7
1 file changed
+6
@@ -1075,6 +1075,12 @@ qemuSnapshotPrepare(virDomainObj *vm,
|
||||
}
|
||||
}
|
||||
|
||||
if (*has_manual && (*flags & VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE)) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("'manual' disk snapshot mode requires explicit quiescing (VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE is not supported)"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Alter flags to let later users know what we learned. */
|
||||
if (external && !active)
|
||||
*flags |= VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY;
|
||||
|
||||
Reference in new issue
Block a user