|
|
fbe740 |
From 3d1a4ab1ce9fce88a759e11532b6891903f86a4a Mon Sep 17 00:00:00 2001
|
|
|
fbe740 |
Message-Id: <3d1a4ab1ce9fce88a759e11532b6891903f86a4a@dist-git>
|
|
|
fbe740 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
fbe740 |
Date: Fri, 3 Apr 2020 14:32:57 +0200
|
|
|
fbe740 |
Subject: [PATCH] qemu: checkpoint: Allow checkpoint redefine for offline VMs
|
|
|
fbe740 |
MIME-Version: 1.0
|
|
|
fbe740 |
Content-Type: text/plain; charset=UTF-8
|
|
|
fbe740 |
Content-Transfer-Encoding: 8bit
|
|
|
fbe740 |
|
|
|
fbe740 |
Skip the liveness and capability checks when redefining checkpoints as
|
|
|
fbe740 |
we don't need qemu interactions to update the metadata.
|
|
|
fbe740 |
|
|
|
fbe740 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
fbe740 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
fbe740 |
(cherry picked from commit 135a0b3f7142a8d4f591bb24b3ae7d0f36877bf7)
|
|
|
fbe740 |
|
|
|
fbe740 |
https://bugzilla.redhat.com/show_bug.cgi?id=1819755
|
|
|
fbe740 |
|
|
|
fbe740 |
Message-Id: <f1d392d78abde1ffbe1c0244d442bc0ec6aa18a6.1585916255.git.pkrempa@redhat.com>
|
|
|
fbe740 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
fbe740 |
---
|
|
|
fbe740 |
src/qemu/qemu_checkpoint.c | 20 +++++++++++---------
|
|
|
fbe740 |
1 file changed, 11 insertions(+), 9 deletions(-)
|
|
|
fbe740 |
|
|
|
fbe740 |
diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c
|
|
|
fbe740 |
index 16480518fa..34cf122eb3 100644
|
|
|
fbe740 |
--- a/src/qemu/qemu_checkpoint.c
|
|
|
fbe740 |
+++ b/src/qemu/qemu_checkpoint.c
|
|
|
fbe740 |
@@ -649,16 +649,18 @@ qemuCheckpointCreateXML(virDomainPtr domain,
|
|
|
fbe740 |
update_current = false;
|
|
|
fbe740 |
}
|
|
|
fbe740 |
|
|
|
fbe740 |
- if (!virDomainObjIsActive(vm)) {
|
|
|
fbe740 |
- virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
|
|
fbe740 |
- _("cannot create checkpoint for inactive domain"));
|
|
|
fbe740 |
- return NULL;
|
|
|
fbe740 |
- }
|
|
|
fbe740 |
+ if (!redefine) {
|
|
|
fbe740 |
+ if (!virDomainObjIsActive(vm)) {
|
|
|
fbe740 |
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
|
|
fbe740 |
+ _("cannot create checkpoint for inactive domain"));
|
|
|
fbe740 |
+ return NULL;
|
|
|
fbe740 |
+ }
|
|
|
fbe740 |
|
|
|
fbe740 |
- if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
|
|
|
fbe740 |
- virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
|
|
fbe740 |
- _("incremental backup is not supported yet"));
|
|
|
fbe740 |
- return NULL;
|
|
|
fbe740 |
+ if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
|
|
|
fbe740 |
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
|
|
fbe740 |
+ _("incremental backup is not supported yet"));
|
|
|
fbe740 |
+ return NULL;
|
|
|
fbe740 |
+ }
|
|
|
fbe740 |
}
|
|
|
fbe740 |
|
|
|
fbe740 |
if (!(def = virDomainCheckpointDefParseString(xmlDesc, driver->xmlopt,
|
|
|
fbe740 |
--
|
|
|
fbe740 |
2.26.0
|
|
|
fbe740 |
|