]> git.proxmox.com Git - qemu-server.git/commitdiff
vzdump: improve error logging for query-proxmox-support
authorStefan Reiter <s.reiter@proxmox.com>
Wed, 17 Mar 2021 10:19:35 +0000 (11:19 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 24 Mar 2021 05:51:40 +0000 (06:51 +0100)
Only show "not supported by QEMU version" message if we determine that
to be the actual cause, just print the error otherwise.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
PVE/VZDump/QemuServer.pm

index 5a9ffab10073234187a81701f271d7a9d1f6f74e..4d171d2d85097078e0fbdd06d52836d3820a7988 100644 (file)
@@ -490,9 +490,15 @@ sub archive_pbs {
        };
 
        my $qemu_support = eval { mon_cmd($vmid, "query-proxmox-support") };
-       if (!$qemu_support) {
-           die "PBS backups are not supported by the running QEMU version. Please make "
-             . "sure you've installed the latest version and the VM has been restarted.\n";
+       my $err = $@;
+       if (!$qemu_support || $err) {
+           die "query-proxmox-support returned empty value\n" if !$err;
+           if ($err =~ m/The command query-proxmox-support has not been found/) {
+               die "PBS backups are not supported by the running QEMU version. Please make "
+                 . "sure you've installed the latest version and the VM has been restarted.\n";
+           } else {
+               die "QMP command query-proxmox-support failed - $err\n";
+           }
        }
 
        my $fs_frozen = $self->qga_fs_freeze($task, $vmid);