mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: snapshot: Use better check when reverting external snapshots
https://bugzilla.redhat.com/show_bug.cgi?id=1071264 Reverting of external snapshots is not supported currently. The check that is present doesn't properly check for all aspects that make a snapshot external. Use virDomainSnapshotIsExternal() to do the check.
This commit is contained in:
parent
042c4ab1c9
commit
d410e6f19d
@ -13921,12 +13921,13 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
|
|||||||
"to revert to inactive snapshot"));
|
"to revert to inactive snapshot"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (snap->def->state == VIR_DOMAIN_DISK_SNAPSHOT) {
|
|
||||||
|
if (virDomainSnapshotIsExternal(snap)) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
_("revert to external disk snapshot not supported "
|
_("revert to external snapshot not supported yet"));
|
||||||
"yet"));
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(flags & VIR_DOMAIN_SNAPSHOT_REVERT_FORCE)) {
|
if (!(flags & VIR_DOMAIN_SNAPSHOT_REVERT_FORCE)) {
|
||||||
if (!snap->def->dom) {
|
if (!snap->def->dom) {
|
||||||
virReportError(VIR_ERR_SNAPSHOT_REVERT_RISKY,
|
virReportError(VIR_ERR_SNAPSHOT_REVERT_RISKY,
|
||||||
|
Loading…
Reference in New Issue
Block a user