[PATCH qemu-server 1/2] backup: vma: add context to error message upon backup start

Fiona Ebner
2026-03-26T11:32:41Z

Upon failure, the queue_execute() function returns the error message
from QEMU directly:

> INFO: issuing guest-agent 'fs-freeze' command
> INFO: issuing guest-agent 'fs-thaw' command
> ERROR: <error message from QEMU>

Many such error messages mention internal QEMU functions and can be
hard to interpret without knowledge of QEMU.

Add some context to the error message to improve this:

> INFO: issuing guest-agent 'fs-freeze' command
> INFO: issuing guest-agent 'fs-thaw' command
> ERROR: executing QMP command to start backup failed - <error message from QEMU>

In case of PBS and provider-based backups, mon_cmd() is used, which
already includes the information which failed QMP command it is, for
example, for PBS:

> ERROR: VM 100 qmp command 'backup' failed - <error message from QEMU>

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/VZDump/QemuServer.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/VZDump/QemuServer.pm b/src/PVE/VZDump/QemuServer.pm
index 0681661d..2d55fbfa 100644
--- a/src/PVE/VZDump/QemuServer.pm
+++ b/src/PVE/VZDump/QemuServer.pm
@@ -1031,7 +1031,7 @@ sub archive_vma {
$self->qga_fs_thaw($vmid);
}

- die $qmperr if $qmperr;
+ die "executing QMP command to start backup failed - $qmperr" if $qmperr;
die $qmpclient->{errors}->{$vmid} if $qmpclient->{errors}->{$vmid};

if ($cpid) {
--
2.47.3