From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id AAE4E1FF13B for ; Wed, 25 Mar 2026 22:34:43 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0CD4935F69; Wed, 25 Mar 2026 22:34:57 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server v2 2/4] agent: treat freeze-fs-on-backup as alias for guest-fsfreeze Date: Wed, 25 Mar 2026 22:28:03 +0100 Message-ID: <20260325213415.3861690-3-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260325213415.3861690-1-t.lamprecht@proxmox.com> References: <20260325213415.3861690-1-t.lamprecht@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774474412500 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.011 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 2JKSJPJM3KAYNWE6TBR3UU7B6N3B2ZQG X-Message-ID-Hash: 2JKSJPJM3KAYNWE6TBR3UU7B6N3B2ZQG X-MailFrom: t.lamprecht@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- src/PVE/QemuServer/Agent.pm | 15 ++++++--------- src/PVE/VZDump/QemuServer.pm | 6 +----- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/PVE/QemuServer/Agent.pm b/src/PVE/QemuServer/Agent.pm index 7520dd6e..b0abd7c0 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 0681661d..9f3cd191 100644 --- a/src/PVE/VZDump/QemuServer.pm +++ b/src/PVE/VZDump/QemuServer.pm @@ -1108,11 +1108,7 @@ sub qga_fs_freeze { return; } - 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) { + 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