mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
test: snapshot revert: drop error the VM must be restarted
This will always happen so there is no need to error out and require usage of FORCE flag. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
a4942cfa3a
commit
5956eddf9f
@ -9048,18 +9048,6 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!(flags & VIR_DOMAIN_SNAPSHOT_REVERT_FORCE)) {
|
||||
if (virDomainObjIsActive(vm) &&
|
||||
!(snapdef->state == VIR_DOMAIN_SNAPSHOT_RUNNING ||
|
||||
snapdef->state == VIR_DOMAIN_SNAPSHOT_PAUSED) &&
|
||||
(flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING |
|
||||
VIR_DOMAIN_SNAPSHOT_REVERT_PAUSED))) {
|
||||
virReportError(VIR_ERR_SNAPSHOT_REVERT_RISKY, "%s",
|
||||
_("must respawn guest to start inactive snapshot"));
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
virDomainSnapshotSetCurrent(vm->snapshots, NULL);
|
||||
|
||||
config = virDomainDefCopy(snap->def->dom,
|
||||
|
Loading…
x
Reference in New Issue
Block a user