From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server 2/4] agent: treat freeze-fs-on-backup as alias for guest-fsfreeze
Date: Wed, 25 Mar 2026 21:49:16 +0100 [thread overview]
Message-ID: <20260325210021.3789748-3-t.lamprecht@proxmox.com> (raw)
In-Reply-To: <20260325210021.3789748-1-t.lamprecht@proxmox.com>
Alias the deprecated key to 'guest-fsfreeze' through the JSONSchema
alias key support so consumers see a single, consistent value.
Previously only the backup code path fell back to it, while snapshots,
replications, clones and imports silently ignored it.
Note that while alias support for top-level JSON schema has a bug [0],
the one for property strings - which this here is - works out fine.
[0]: https://lore.proxmox.com/all/20251205100317.1101549-1-d.csapak@proxmox.com/
The key stays in the schema indefinitely for old backup restore
compatibility rather than being removed in a future major release.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
src/PVE/QemuServer/Agent.pm | 15 ++++++---------
src/PVE/VZDump/QemuServer.pm | 7 +------
2 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/src/PVE/QemuServer/Agent.pm b/src/PVE/QemuServer/Agent.pm
index 4bc7cfa1..c0315a03 100644
--- a/src/PVE/QemuServer/Agent.pm
+++ b/src/PVE/QemuServer/Agent.pm
@@ -35,25 +35,21 @@ our $agent_fmt = {
optional => 1,
default => 0,
},
- # TODO Remove for Proxmox VE 10
'freeze-fs-on-backup' => {
- description => "Deprecated: Use 'guest-fsfreeze' instead.\n\n"
- . "Freeze/thaw guest filesystems on backup for consistency.",
type => 'boolean',
optional => 1,
- default => 1,
+ alias => 'guest-fsfreeze', # keep for old backup restore compatibility
},
'guest-fsfreeze' => {
- description =>
- "Whether to issue the guest-fsfreeze-freeze and guest-fsfreeze-thaw QEMU guest agent"
- . " commands.",
+ description => "Freeze guest filesystems through QGA for consistent disk state on"
+ . " operations such as snapshots, backups, replications and clones.",
verbose_description =>
"Whether to issue the guest-fsfreeze-freeze and guest-fsfreeze-thaw QEMU guest agent"
. " commands. Backups in snapshot mode, clones, snapshots without RAM, importing"
. " disks from a running guest, and replications normally issue a guest-fsfreeze-freeze"
. " and a respective thaw command when the QEMU Guest agent option is enabled in the"
- . " guest's configuration and the agent is running inside of the guest.\n\nWhen set, it"
- . " will take precedence over 'freeze-fs-on-backup'.",
+ . " guest's configuration and the agent is running inside of the guest.\n\nThe deprecated"
+ . " 'freeze-fs-on-backup' setting is treated as an alias for this setting.",
type => 'boolean',
optional => 1,
default => 1,
@@ -77,6 +73,7 @@ sub parse_guest_agent {
# if the agent is disabled ignore the other potentially set properties
return {} if !$res->{enabled};
+
return $res;
}
diff --git a/src/PVE/VZDump/QemuServer.pm b/src/PVE/VZDump/QemuServer.pm
index 55fb6dc4..925172f4 100644
--- a/src/PVE/VZDump/QemuServer.pm
+++ b/src/PVE/VZDump/QemuServer.pm
@@ -1102,12 +1102,7 @@ sub qga_fs_freeze {
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');
- $freeze //= 1;
-
- if (!$freeze) {
+ if (!PVE::QemuServer::Agent::should_fs_freeze($self->{vmlist}->{$vmid})) {
$self->loginfo("skipping guest-agent 'fs-freeze', disabled in VM options");
return;
}
--
2.47.3
next prev parent reply other threads:[~2026-03-25 21:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 20:49 [PATCH qemu-server 0/4] rework fs-freeze agent property Thomas Lamprecht
2026-03-25 20:49 ` [PATCH qemu-server 1/4] agent: add should_fs_freeze helper Thomas Lamprecht
2026-03-25 20:49 ` Thomas Lamprecht [this message]
2026-03-25 20:49 ` [PATCH qemu-server 3/4] tests: cfg2cmd: add agent guest-fsfreeze config tests Thomas Lamprecht
2026-03-25 20:49 ` [PATCH qemu-server 4/4] qga: rename guest-fsfreeze to freeze-fs Thomas Lamprecht
2026-03-25 21:35 ` superseded: [PATCH qemu-server 0/4] rework fs-freeze agent property Thomas Lamprecht
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=20260325210021.3789748-3-t.lamprecht@proxmox.com \
--to=t.lamprecht@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 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.