* [PATCH-SERIES qemu-server 0/2] backup: improve logging upon backup start
@ 2026-03-26 11:31 Fiona Ebner
2026-03-26 11:31 ` [PATCH qemu-server 1/2] backup: vma: add context to error message " Fiona Ebner
2026-03-26 11:31 ` [PATCH qemu-server 2/2] backup: log backup start via QMP command to avoid confusion about freeze/thaw Fiona Ebner
0 siblings, 2 replies; 3+ messages in thread
From: Fiona Ebner @ 2026-03-26 11:31 UTC (permalink / raw)
To: pve-devel
Add some context to the error message when a VMA backup fails upon
backup start.
Clarify that the QMP command to start a backup happens in between
freeze and thaw.
qemu-server:
Fiona Ebner (2):
backup: vma: add context to error message upon backup start
backup: log backup start via QMP command to avoid confusion about
freeze/thaw
src/PVE/VZDump/QemuServer.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Summary over all repositories:
1 files changed, 3 insertions(+), 1 deletions(-)
--
Generated by git-murpp 0.5.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH qemu-server 1/2] backup: vma: add context to error message upon backup start
2026-03-26 11:31 [PATCH-SERIES qemu-server 0/2] backup: improve logging upon backup start Fiona Ebner
@ 2026-03-26 11:31 ` Fiona Ebner
2026-03-26 11:31 ` [PATCH qemu-server 2/2] backup: log backup start via QMP command to avoid confusion about freeze/thaw Fiona Ebner
1 sibling, 0 replies; 3+ messages in thread
From: Fiona Ebner @ 2026-03-26 11:31 UTC (permalink / raw)
To: pve-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH qemu-server 2/2] backup: log backup start via QMP command to avoid confusion about freeze/thaw
2026-03-26 11:31 [PATCH-SERIES qemu-server 0/2] backup: improve logging upon backup start Fiona Ebner
2026-03-26 11:31 ` [PATCH qemu-server 1/2] backup: vma: add context to error message " Fiona Ebner
@ 2026-03-26 11:31 ` Fiona Ebner
1 sibling, 0 replies; 3+ messages in thread
From: Fiona Ebner @ 2026-03-26 11:31 UTC (permalink / raw)
To: pve-devel
Curently, a backup task log looks like:
> INFO: issuing guest-agent 'fs-freeze' command
> INFO: issuing guest-agent 'fs-thaw' command
> INFO: started backup task 'beebb719-bdb8-4de8-9d34-5cbf182cea3e'
or in case of a failure during backup start:
> INFO: issuing guest-agent 'fs-freeze' command
> INFO: issuing guest-agent 'fs-thaw' command
> ERROR: VM 100 qmp command 'backup' failed - <error message from QEMU>
Both might suggest that the thaw operation and starting the backup
happen in the wrong order, which can lead to confusion. Add a log line
when issuing the 'backup' QMP command to clarify that this is not the
case.
After the patch, the task logs look like:
> INFO: issuing guest-agent 'fs-freeze' command
> INFO: starting backup via QMP command
> INFO: issuing guest-agent 'fs-thaw' command
> INFO: started backup task 'e4e961c1-661b-4971-aefb-6715fd6a0d70'
or in case of a failure during backup start:
> INFO: issuing guest-agent 'fs-freeze' command
> INFO: starting backup via QMP command
> INFO: issuing guest-agent 'fs-thaw' command
> ERROR: VM 100 qmp command 'backup' failed - <error message from QEMU>
In case of provider-based backups, there already is a log-message
between freeze and thaw:
> INFO: issuing guest-agent 'fs-freeze' command
> INFO: setting up snapshot-access for backup
> INFO: issuing guest-agent 'fs-thaw' command
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/VZDump/QemuServer.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/PVE/VZDump/QemuServer.pm b/src/PVE/VZDump/QemuServer.pm
index 2d55fbfa..cdf20219 100644
--- a/src/PVE/VZDump/QemuServer.pm
+++ b/src/PVE/VZDump/QemuServer.pm
@@ -841,6 +841,7 @@ sub archive_pbs {
$params->{timeout} = 125; # give some time to connect to the backup server
+ $self->loginfo("starting backup via QMP command");
my $res = eval { mon_cmd($vmid, "backup", %$params) };
my $qmperr = $@;
$backup_job_uuid = $res->{UUID} if $res;
@@ -1024,6 +1025,7 @@ sub archive_vma {
my $fs_frozen = $self->qga_fs_freeze($task, $vmid);
+ $self->loginfo("starting backup via QMP command");
eval { $qmpclient->queue_execute(30) };
my $qmperr = $@;
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-26 11:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-26 11:31 [PATCH-SERIES qemu-server 0/2] backup: improve logging upon backup start Fiona Ebner
2026-03-26 11:31 ` [PATCH qemu-server 1/2] backup: vma: add context to error message " Fiona Ebner
2026-03-26 11:31 ` [PATCH qemu-server 2/2] backup: log backup start via QMP command to avoid confusion about freeze/thaw Fiona Ebner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.