From: Peter Krempa <pkrempa(a)redhat.com>
As all supported qemu versions now support the QMP internal snapshot
commands (QEMU_CAPS_SNAPSHOT_INTERNAL_QMP is always present) we can
remove the code for loading snapshots during startup via '-loadvm'.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_command.c | 6 ------
src/qemu/qemu_process.c | 3 +--
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 86eb52f197..e6d308534f 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -10685,12 +10685,6 @@ qemuBuildCommandLine(virDomainObj *vm,
if (qemuBuildSecCommandLine(vm, cmd, def->sec) < 0)
return NULL;
- /* Internal snapshot reversion happens via QMP command after startup if
- * supported */
- if (snapshot &&
- !virQEMUCapsGet(qemuCaps, QEMU_CAPS_SNAPSHOT_INTERNAL_QMP))
- virCommandAddArgList(cmd, "-loadvm", snapshot->def->name, NULL);
-
if (def->namespaceData) {
qemuDomainXmlNsDef *qemuxmlns;
GStrv n;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 842f559439..015a98d035 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -8239,8 +8239,7 @@ qemuProcessLaunch(virConnectPtr conn,
qemuDomainVcpuPersistOrder(vm->def);
- if (snapshot &&
- virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SNAPSHOT_INTERNAL_QMP)) {
+ if (snapshot) {
VIR_DEBUG("reverting internal snapshot via QMP");
if (qemuSnapshotInternalRevert(vm, snapshot, asyncJob) < 0)
goto cleanup;
--
2.49.0