|
|
d76c62 |
From 5155fcbbff955e9c1446b3564af2252a5c15548a Mon Sep 17 00:00:00 2001
|
|
|
d76c62 |
Message-Id: <5155fcbbff955e9c1446b3564af2252a5c15548a@dist-git>
|
|
|
d76c62 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Date: Fri, 3 Apr 2020 14:32:56 +0200
|
|
|
d76c62 |
Subject: [PATCH] qemuCheckpointCreateXML: Check VM liveness first
|
|
|
d76c62 |
MIME-Version: 1.0
|
|
|
d76c62 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d76c62 |
Content-Transfer-Encoding: 8bit
|
|
|
d76c62 |
|
|
|
d76c62 |
Move the liveness check prior to the capability check. If the VM is
|
|
|
d76c62 |
offline the capabilities are not initialized and thus we'd report the
|
|
|
d76c62 |
wrong error.
|
|
|
d76c62 |
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1812531
|
|
|
d76c62 |
|
|
|
d76c62 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
d76c62 |
(cherry picked from commit 4257c203737e5ef616588e80794cc705a5fb475a)
|
|
|
d76c62 |
|
|
|
d76c62 |
Note that this patch is backported as a conflict resolution for the bugs
|
|
|
d76c62 |
below
|
|
|
d76c62 |
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1819755
|
|
|
d76c62 |
|
|
|
d76c62 |
Message-Id: <94fcc1654f3e2fb2d4c1da07347d686180bac532.1585916255.git.pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
src/qemu/qemu_checkpoint.c | 8 ++++----
|
|
|
d76c62 |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c
|
|
|
d76c62 |
index 19822bd74d..16480518fa 100644
|
|
|
d76c62 |
--- a/src/qemu/qemu_checkpoint.c
|
|
|
d76c62 |
+++ b/src/qemu/qemu_checkpoint.c
|
|
|
d76c62 |
@@ -649,15 +649,15 @@ qemuCheckpointCreateXML(virDomainPtr domain,
|
|
|
d76c62 |
update_current = false;
|
|
|
d76c62 |
}
|
|
|
d76c62 |
|
|
|
d76c62 |
- if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
|
|
|
d76c62 |
+ if (!virDomainObjIsActive(vm)) {
|
|
|
d76c62 |
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
|
|
d76c62 |
- _("incremental backup is not supported yet"));
|
|
|
d76c62 |
+ _("cannot create checkpoint for inactive domain"));
|
|
|
d76c62 |
return NULL;
|
|
|
d76c62 |
}
|
|
|
d76c62 |
|
|
|
d76c62 |
- if (!virDomainObjIsActive(vm)) {
|
|
|
d76c62 |
+ if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
|
|
|
d76c62 |
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
|
|
d76c62 |
- _("cannot create checkpoint for inactive domain"));
|
|
|
d76c62 |
+ _("incremental backup is not supported yet"));
|
|
|
d76c62 |
return NULL;
|
|
|
d76c62 |
}
|
|
|
d76c62 |
|
|
|
d76c62 |
--
|
|
|
d76c62 |
2.26.0
|
|
|
d76c62 |
|