From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server 3/8] backup: freeze: fix check if agent is enabled
Date: Tue, 24 Mar 2026 14:50:43 +0100 [thread overview]
Message-ID: <20260324135325.120749-4-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260324135325.120749-1-f.ebner@proxmox.com>
Just checking whether the configuration is present does not mean that
the guest agent is enabled. Explicitly check the 'enabled' property.
In case of clone/import and snapshot, this is already done. This
avoids a log message about the agent not running, since there is no
device added to the QEMU commandline for communicating with the agent
if disabled.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/VZDump/QemuServer.pm | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/PVE/VZDump/QemuServer.pm b/src/PVE/VZDump/QemuServer.pm
index 55fb6dc4..0681661d 100644
--- a/src/PVE/VZDump/QemuServer.pm
+++ b/src/PVE/VZDump/QemuServer.pm
@@ -1092,19 +1092,24 @@ sub _get_task_devlist {
sub qga_fs_freeze {
my ($self, $task, $vmid) = @_;
return
- if !$self->{vmlist}->{$vmid}->{agent}
- || $task->{mode} eq 'stop'
+ if $task->{mode} eq 'stop'
|| !$self->{vm_was_running}
|| $self->{vm_was_paused};
+ my $conf = $self->{vmlist}->{$vmid};
+
+ if (!PVE::QemuServer::Agent::get_qga_key($conf, 'enabled')) {
+ $self->loginfo("skipping guest-agent 'fs-freeze', agent not configured in VM options");
+ return;
+ }
+
if (!PVE::QemuServer::Agent::qga_check_running($vmid, 1)) {
$self->loginfo("skipping guest-agent 'fs-freeze', agent configured but not running?");
return;
}
- my $freeze = PVE::QemuServer::Agent::get_qga_key($self->{vmlist}->{$vmid}, 'guest-fsfreeze');
- $freeze //=
- PVE::QemuServer::Agent::get_qga_key($self->{vmlist}->{$vmid}, 'freeze-fs-on-backup');
+ my $freeze = PVE::QemuServer::Agent::get_qga_key($conf, 'guest-fsfreeze');
+ $freeze //= PVE::QemuServer::Agent::get_qga_key($conf, 'freeze-fs-on-backup');
$freeze //= 1;
if (!$freeze) {
--
2.47.3
next prev parent reply other threads:[~2026-03-24 13:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 13:50 [PATCH-SERIES qemu-server 0/8] fix #7383: agent: fsfreeze: skip freeze if already frozen Fiona Ebner
2026-03-24 13:50 ` [PATCH qemu-server 1/8] agent: fs thaw: check command result Fiona Ebner
2026-03-25 21:20 ` applied: " Thomas Lamprecht
2026-03-24 13:50 ` [PATCH qemu-server 2/8] api: clone/import: fix check if agent is enabled Fiona Ebner
2026-03-25 21:20 ` applied: " Thomas Lamprecht
2026-03-24 13:50 ` Fiona Ebner [this message]
2026-03-25 21:20 ` applied: [PATCH qemu-server 3/8] backup: freeze: " Thomas Lamprecht
2026-03-24 13:50 ` [PATCH qemu-server 4/8] agent: parse: change signature to take property string rather than full VM config Fiona Ebner
2026-03-24 13:50 ` [PATCH qemu-server 5/8] agent: get qga key: " Fiona Ebner
2026-03-24 13:50 ` [PATCH qemu-server 6/8] clone disk/block jobs: change signatures to take guest agent property string Fiona Ebner
2026-03-24 13:50 ` [PATCH qemu-server 7/8] agent: fsfreeze: harmonize checks for guest fs freeze Fiona Ebner
2026-03-25 21:16 ` Thomas Lamprecht
2026-03-24 13:50 ` [PATCH qemu-server 8/8] fix #7383: agent: fsfreeze: skip freeze if already frozen Fiona Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260324135325.120749-4-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox