[pve-devel] [PATCH qemu-server] vzdump: fix log output for disks with iothread

Aaron Lauterer a.lauterer at proxmox.com
Wed Feb 26 11:53:01 CET 2020


If IO-Thread is activated and a new enough Qemu version installed the
program still ran into the elsif clause and never in the else clause.
Thus the "include disk ..." log output was missing for these disks.

Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
 PVE/VZDump/QemuServer.pm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
index 7695ad6..e36a259 100644
--- a/PVE/VZDump/QemuServer.pm
+++ b/PVE/VZDump/QemuServer.pm
@@ -79,11 +79,12 @@ sub prepare {
 	if (defined($drive->{backup}) && !$drive->{backup}) {
 	    $self->loginfo("exclude disk '$ds' '$volid' (backup=no)");
 	    return;
-	} elsif ($self->{vm_was_running} && $drive->{iothread}) {
-	    if (!PVE::QemuServer::Machine::runs_at_least_qemu_version($vmid, 4, 0, 1)) {
-		die "disk '$ds' '$volid' (iothread=on) can't use backup feature with running QEMU " .
+	} elsif ($self->{vm_was_running}
+		 && $drive->{iothread}
+		 && !PVE::QemuServer::Machine::runs_at_least_qemu_version($vmid, 4, 0, 1))
+	{
+	    die "disk '$ds' '$volid' (iothread=on) can't use backup feature with running QEMU " .
 		    "version < 4.0.1! Either set backup=no for this drive or upgrade QEMU and restart VM\n";
-	    }
 	} elsif ($ds =~ m/^efidisk/ && (!defined($conf->{bios}) || $conf->{bios} ne 'ovmf')) {
 	    $self->loginfo("excluding '$ds' (efidisks can only be backed up when BIOS is set to 'ovmf')");
 	    return;
-- 
2.20.1





More information about the pve-devel mailing list