all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs
@ 2026-01-02 14:35 Maximiliano Sandoval
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 1/8] add a guest-fsfreeze qga setting Maximiliano Sandoval
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Maximiliano Sandoval @ 2026-01-02 14:35 UTC (permalink / raw)
  To: pve-devel

..and add more logging when issuing fsfreeze guest commands.

The new setting takes precedence over freeze-fs-on-backup and deprecates the
former.

- At the moment taking a snapshot without RAM does not log whether there was a
  freeze/thaw, we add logs when issuing freezes/thaws.

- The patch does not result in an extra log line when making a Backup in
  snapshot mode.

- When it is easy to do so, we log if the fsfreeze command was not issued due to
  mismatch between the agent running and the config, e.g. when say that we
  skipped it if the agent is enabled bu the configuration says we shouldn't.

What was tested:

 - Backups of a VM with and another without guest-fsfreeze enabled. They both
   print a message indicating that a fsfreeze happend.

 - A live clone of a VM with and another without guest-fsfreeze enabled. They
   both print a message indicating that a fsfreeze happend.

 - Snapshot of a VM with and another without guest-fsfreeze enabled. Only the
   format logged a message indicating that a fsfreeze happened.


Differences from v3:

 - Instead of removing logfunc statements and adding a print to the base
   __snapshot_freeze we add a print on the snapshot method which was the one
   missing a log. This means we do not need changes in pve-container anymore.
 - Add a helper to thaw a qemu guest. This is done only for readability.
 - Read the guest config right at the start of the worker
 - Rebase on top of master

Differences from v2:

 - Print a message on live clones when fsfreeze is skipped due to config
 - Clean up code a bit
 - rebase
 - Fix a typo

Differences from v1:

 - Add setting to enable/disable fsfreeze commands
 - Change wording in one log message


qemu-server:

Maximiliano Sandoval (8):
  add a guest-fsfreeze qga setting
  api: clone_vm: follow guest-fsfreeze setting
  fix #1964: follow guest-fsfreeze setting on check freeze needed
  agent: add a guest_fsthaw helper
  port users of guest-fsfreeze-thaw users to helper
  block job: log when a fsfreeze could not happen
  block job: mirror: reword fsfreeze log entry
  deprecate freeze-fs-on-backup qga setting

 src/PVE/API2/Qemu.pm           |  5 ++++-
 src/PVE/QemuConfig.pm          |  5 +++--
 src/PVE/QemuServer/Agent.pm    | 31 ++++++++++++++++++++++++++++++-
 src/PVE/QemuServer/BlockJob.pm | 18 ++++++++++++------
 src/PVE/VZDump/QemuServer.pm   |  9 ++++++---
 5 files changed, 55 insertions(+), 13 deletions(-)


pve-guest-common:

Maximiliano Sandoval (1):
  abstract config: print when {,un}freezing a fs

 src/PVE/AbstractConfig.pm | 2 ++
 1 file changed, 2 insertions(+)


Summary over all repositories:
  6 files changed, 57 insertions(+), 13 deletions(-)

-- 
Generated by murpp 0.9.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH qemu-server v4 1/8] add a guest-fsfreeze qga setting
  2026-01-02 14:35 [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
@ 2026-01-02 14:35 ` Maximiliano Sandoval
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 2/8] api: clone_vm: follow guest-fsfreeze setting Maximiliano Sandoval
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Maximiliano Sandoval @ 2026-01-02 14:35 UTC (permalink / raw)
  To: pve-devel

Adds a new setting that controls whether guest-fsfreeze-{freeze,thaw}
commands should be issued. The previous setting was only taken into
account for backups.

In this commit we only use this setting for backups. The following two
commits will ensure the setting is used on replications, snapshots and
clones.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 src/PVE/QemuServer/Agent.pm  | 11 +++++++++++
 src/PVE/VZDump/QemuServer.pm |  7 +++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/PVE/QemuServer/Agent.pm b/src/PVE/QemuServer/Agent.pm
index 5d88b7bd..6ce76a14 100644
--- a/src/PVE/QemuServer/Agent.pm
+++ b/src/PVE/QemuServer/Agent.pm
@@ -41,6 +41,17 @@ our $agent_fmt = {
         optional => 1,
         default => 1,
     },
+    'guest-fsfreeze' => {
+        description =>
+            "Whether to issue the guest-fsfreeze-freeze and guest-fsfreeze-thaw QEMU guest agent commands.\n\n"
+            . "Backups in snapshot mode, clones, snapshots without RAM, and replications normally issue a "
+            . "guest-fsfreeze-freeze and a respective thaw command when the QEMU Guest agent option is "
+            . "enabled on the guest's configuration and the agent is running inside of the guest.\n\n"
+            . "When set it will take precedence over 'freeze-fs-on-backup'.",
+        type => 'boolean',
+        optional => 1,
+        default => 1,
+    },
     type => {
         description => "Select the agent type",
         type => 'string',
diff --git a/src/PVE/VZDump/QemuServer.pm b/src/PVE/VZDump/QemuServer.pm
index 84ebbe80..af684a1d 100644
--- a/src/PVE/VZDump/QemuServer.pm
+++ b/src/PVE/VZDump/QemuServer.pm
@@ -1102,8 +1102,11 @@ sub qga_fs_freeze {
         return;
     }
 
-    my $freeze =
-        PVE::QemuServer::Agent::get_qga_key($self->{vmlist}->{$vmid}, 'freeze-fs-on-backup') // 1;
+    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) {
         $self->loginfo("skipping guest-agent 'fs-freeze', disabled in VM options");
         return;
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH qemu-server v4 2/8] api: clone_vm: follow guest-fsfreeze setting
  2026-01-02 14:35 [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 1/8] add a guest-fsfreeze qga setting Maximiliano Sandoval
@ 2026-01-02 14:35 ` Maximiliano Sandoval
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 3/8] fix #1964: follow guest-fsfreeze setting on check freeze needed Maximiliano Sandoval
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Maximiliano Sandoval @ 2026-01-02 14:35 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 src/PVE/API2/Qemu.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index 190878de..fc20c1c4 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -4556,6 +4556,9 @@ __PACKAGE__->register_method({
                     $dest_info->{efisize} = PVE::QemuServer::get_efivars_size($oldconf)
                         if $opt eq 'efidisk0';
 
+                    my $qga = $oldconf->{agent}
+                        && PVE::QemuServer::Agent::get_qga_key($oldconf, 'guest-fsfreeze') // 1;
+
                     my $newdrive = PVE::QemuServer::clone_disk(
                         $storecfg,
                         $source_info,
@@ -4564,7 +4567,7 @@ __PACKAGE__->register_method({
                         $newvollist,
                         $jobs,
                         $completion,
-                        $oldconf->{agent},
+                        $qga,
                         $clonelimit,
                     );
 
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH qemu-server v4 3/8] fix #1964: follow guest-fsfreeze setting on check freeze needed
  2026-01-02 14:35 [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 1/8] add a guest-fsfreeze qga setting Maximiliano Sandoval
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 2/8] api: clone_vm: follow guest-fsfreeze setting Maximiliano Sandoval
@ 2026-01-02 14:35 ` Maximiliano Sandoval
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 4/8] agent: add a guest_fsthaw helper Maximiliano Sandoval
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Maximiliano Sandoval @ 2026-01-02 14:35 UTC (permalink / raw)
  To: pve-devel

This method is used by replications and snapshots without RAM.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 src/PVE/QemuConfig.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm
index ad6ce6b0..803e4da4 100644
--- a/src/PVE/QemuConfig.pm
+++ b/src/PVE/QemuConfig.pm
@@ -298,7 +298,8 @@ sub __snapshot_check_freeze_needed {
             $running,
             $running
                 && PVE::QemuServer::Agent::get_qga_key($config, 'enabled')
-                && PVE::QemuServer::Agent::qga_check_running($vmid),
+                && PVE::QemuServer::Agent::qga_check_running($vmid)
+                && PVE::QemuServer::Agent::get_qga_key($config, 'guest-fsfreeze') // 1,
         );
     } else {
         return ($running, 0);
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH qemu-server v4 4/8] agent: add a guest_fsthaw helper
  2026-01-02 14:35 [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
                   ` (2 preceding siblings ...)
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 3/8] fix #1964: follow guest-fsfreeze setting on check freeze needed Maximiliano Sandoval
@ 2026-01-02 14:35 ` Maximiliano Sandoval
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 5/8] port users of guest-fsfreeze-thaw users to helper Maximiliano Sandoval
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Maximiliano Sandoval @ 2026-01-02 14:35 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 src/PVE/QemuServer/Agent.pm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/PVE/QemuServer/Agent.pm b/src/PVE/QemuServer/Agent.pm
index 6ce76a14..c912b12c 100644
--- a/src/PVE/QemuServer/Agent.pm
+++ b/src/PVE/QemuServer/Agent.pm
@@ -264,4 +264,20 @@ sub guest_fsfreeze {
     die "unable to freeze guest fs - unexpected status '$status'\n" if $status ne 'frozen';
 }
 
+=head3 guest_fsthaw
+
+    guest_fsthaw($vmid);
+
+Thaws the file systems of the guest C<$vmid>. Dies if the file systems cannot be thawed.
+
+See C<$guest_fsfreeze> for more details.
+
+=cut
+
+sub guest_fsthaw {
+    my ($vmid) = @_;
+
+    PVE::QemuServer::Monitor::mon_cmd($vmid, "guest-fsfreeze-thaw");
+}
+
 1;
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH qemu-server v4 5/8] port users of guest-fsfreeze-thaw users to helper
  2026-01-02 14:35 [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
                   ` (3 preceding siblings ...)
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 4/8] agent: add a guest_fsthaw helper Maximiliano Sandoval
@ 2026-01-02 14:35 ` Maximiliano Sandoval
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 6/8] block job: log when a fsfreeze could not happen Maximiliano Sandoval
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Maximiliano Sandoval @ 2026-01-02 14:35 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 src/PVE/QemuConfig.pm          | 2 +-
 src/PVE/QemuServer/BlockJob.pm | 2 +-
 src/PVE/VZDump/QemuServer.pm   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm
index 803e4da4..bd67be1a 100644
--- a/src/PVE/QemuConfig.pm
+++ b/src/PVE/QemuConfig.pm
@@ -310,7 +310,7 @@ sub __snapshot_freeze {
     my ($class, $vmid, $unfreeze) = @_;
 
     if ($unfreeze) {
-        eval { mon_cmd($vmid, "guest-fsfreeze-thaw"); };
+        eval { PVE::QemuServer::Agent::guest_fsthaw($vmid); };
         warn "guest-fsfreeze-thaw problems - $@" if $@;
     } else {
         eval { PVE::QemuServer::Agent::guest_fsfreeze($vmid); };
diff --git a/src/PVE/QemuServer/BlockJob.pm b/src/PVE/QemuServer/BlockJob.pm
index c89994db..b25dcf9a 100644
--- a/src/PVE/QemuServer/BlockJob.pm
+++ b/src/PVE/QemuServer/BlockJob.pm
@@ -178,7 +178,7 @@ sub qemu_drive_mirror_monitor {
 
                     if ($agent_running) {
                         print "unfreeze filesystem\n";
-                        eval { mon_cmd($vmid, "guest-fsfreeze-thaw"); };
+                        eval { PVE::QemuServer::Agent::guest_fsthaw($vmid); };
                         warn $@ if $@;
                     } else {
                         print "resume vm\n";
diff --git a/src/PVE/VZDump/QemuServer.pm b/src/PVE/VZDump/QemuServer.pm
index af684a1d..58c86547 100644
--- a/src/PVE/VZDump/QemuServer.pm
+++ b/src/PVE/VZDump/QemuServer.pm
@@ -1124,7 +1124,7 @@ sub qga_fs_thaw {
     my ($self, $vmid) = @_;
 
     $self->loginfo("issuing guest-agent 'fs-thaw' command");
-    eval { mon_cmd($vmid, "guest-fsfreeze-thaw") };
+    eval { PVE::QemuServer::Agent::guest_fsthaw($vmid); };
     $self->logerr($@) if $@;
 }
 
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH qemu-server v4 6/8] block job: log when a fsfreeze could not happen
  2026-01-02 14:35 [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
                   ` (4 preceding siblings ...)
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 5/8] port users of guest-fsfreeze-thaw users to helper Maximiliano Sandoval
@ 2026-01-02 14:35 ` Maximiliano Sandoval
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 7/8] block job: mirror: reword fsfreeze log entry Maximiliano Sandoval
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Maximiliano Sandoval @ 2026-01-02 14:35 UTC (permalink / raw)
  To: pve-devel

We print a message when the config says that we should issue a
guest-fsfreeze-freeze command but we can't because the agent is not
running or vise versa.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 src/PVE/QemuServer/BlockJob.pm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/PVE/QemuServer/BlockJob.pm b/src/PVE/QemuServer/BlockJob.pm
index b25dcf9a..313918e3 100644
--- a/src/PVE/QemuServer/BlockJob.pm
+++ b/src/PVE/QemuServer/BlockJob.pm
@@ -162,11 +162,17 @@ sub qemu_drive_mirror_monitor {
                 last if $completion eq 'skip' || $completion eq 'auto';
 
                 if ($vmiddst && $vmiddst != $vmid) {
-                    my $agent_running = $qga && qga_check_running($vmid);
-                    if ($agent_running) {
+                    my $agent_running = qga_check_running($vmid);
+                    my $should_fsfreeze = $qga && $agent_running;
+                    if ($should_fsfreeze) {
                         print "freeze filesystem\n";
                         eval { PVE::QemuServer::Agent::guest_fsfreeze($vmid); };
                         warn $@ if $@;
+                    } elsif ($agent_running && !$qga) {
+                        print "skipping guest-agent 'guest-fsfreeze-freeze', disabled in VM options\n";
+                    } elsif (!$agent_running && $qga) {
+                        print
+                            "skipping guest agent 'guest-fsfreeze-freeze' command: the agent is not running inside of the guest\n";
                     } else {
                         print "suspend vm\n";
                         eval { PVE::QemuServer::RunState::vm_suspend($vmid, 1); };
@@ -176,7 +182,7 @@ sub qemu_drive_mirror_monitor {
                     # if we clone a disk for a new target vm, we don't switch the disk
                     qemu_blockjobs_cancel($vmid, $jobs);
 
-                    if ($agent_running) {
+                    if ($should_fsfreeze) {
                         print "unfreeze filesystem\n";
                         eval { PVE::QemuServer::Agent::guest_fsthaw($vmid); };
                         warn $@ if $@;
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH qemu-server v4 7/8] block job: mirror: reword fsfreeze log entry
  2026-01-02 14:35 [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
                   ` (5 preceding siblings ...)
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 6/8] block job: log when a fsfreeze could not happen Maximiliano Sandoval
@ 2026-01-02 14:35 ` Maximiliano Sandoval
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 8/8] deprecate freeze-fs-on-backup qga setting Maximiliano Sandoval
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: Maximiliano Sandoval @ 2026-01-02 14:35 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 src/PVE/QemuServer/BlockJob.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/QemuServer/BlockJob.pm b/src/PVE/QemuServer/BlockJob.pm
index 313918e3..e5568f45 100644
--- a/src/PVE/QemuServer/BlockJob.pm
+++ b/src/PVE/QemuServer/BlockJob.pm
@@ -165,7 +165,7 @@ sub qemu_drive_mirror_monitor {
                     my $agent_running = qga_check_running($vmid);
                     my $should_fsfreeze = $qga && $agent_running;
                     if ($should_fsfreeze) {
-                        print "freeze filesystem\n";
+                        print "issuing guest agent 'guest-fsfreeze-freeze' command\n";
                         eval { PVE::QemuServer::Agent::guest_fsfreeze($vmid); };
                         warn $@ if $@;
                     } elsif ($agent_running && !$qga) {
@@ -183,7 +183,7 @@ sub qemu_drive_mirror_monitor {
                     qemu_blockjobs_cancel($vmid, $jobs);
 
                     if ($should_fsfreeze) {
-                        print "unfreeze filesystem\n";
+                        print "issuing guest agent 'guest-fsfreeze-thaw' command\n";
                         eval { PVE::QemuServer::Agent::guest_fsthaw($vmid); };
                         warn $@ if $@;
                     } else {
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH qemu-server v4 8/8] deprecate freeze-fs-on-backup qga setting
  2026-01-02 14:35 [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
                   ` (6 preceding siblings ...)
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 7/8] block job: mirror: reword fsfreeze log entry Maximiliano Sandoval
@ 2026-01-02 14:35 ` Maximiliano Sandoval
  2026-01-02 14:35 ` [pve-devel] [PATCH guest-common v4 1/1] abstract config: print when {, un}freezing a fs Maximiliano Sandoval
  2026-01-02 15:27 ` [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
  9 siblings, 0 replies; 12+ messages in thread
From: Maximiliano Sandoval @ 2026-01-02 14:35 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 src/PVE/QemuServer/Agent.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/PVE/QemuServer/Agent.pm b/src/PVE/QemuServer/Agent.pm
index c912b12c..3d36bb0e 100644
--- a/src/PVE/QemuServer/Agent.pm
+++ b/src/PVE/QemuServer/Agent.pm
@@ -35,8 +35,10 @@ our $agent_fmt = {
         optional => 1,
         default => 0,
     },
+    # TODO Remove for Proxmox VE 10
     'freeze-fs-on-backup' => {
-        description => "Freeze/thaw guest filesystems on backup for consistency.",
+        description => "Deprecated: Use 'guest-fsfreeze' instead.\n\n"
+            . " Freeze/thaw guest filesystems on backup for consistency.",
         type => 'boolean',
         optional => 1,
         default => 1,
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [pve-devel] [PATCH guest-common v4 1/1] abstract config: print when {, un}freezing a fs
  2026-01-02 14:35 [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
                   ` (7 preceding siblings ...)
  2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 8/8] deprecate freeze-fs-on-backup qga setting Maximiliano Sandoval
@ 2026-01-02 14:35 ` Maximiliano Sandoval
  2026-01-02 15:27 ` [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
  9 siblings, 0 replies; 12+ messages in thread
From: Maximiliano Sandoval @ 2026-01-02 14:35 UTC (permalink / raw)
  To: pve-devel

There are two callers of __snapshot_freeze: replication and snapshot. On
the former we already use the log function to log both freeze & thaw
instance and in this commit we add the later.

However, note that we do not have access to a log function at this stage
and we simply print.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 src/PVE/AbstractConfig.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/AbstractConfig.pm b/src/PVE/AbstractConfig.pm
index 420a10d..13accf8 100644
--- a/src/PVE/AbstractConfig.pm
+++ b/src/PVE/AbstractConfig.pm
@@ -840,6 +840,7 @@ sub snapshot_create {
         $class->__snapshot_activate_storages($conf, 0);
 
         if ($freezefs) {
+            print("freeze guest filesystem\n");
             $class->__snapshot_freeze($vmid, 0);
         }
 
@@ -860,6 +861,7 @@ sub snapshot_create {
     if ($running) {
         $class->__snapshot_create_vol_snapshots_hook($vmid, $snap, $running, "after");
         if ($freezefs) {
+            print("unfreeze filesystem\n");
             $class->__snapshot_freeze($vmid, 1);
         }
         $class->__snapshot_create_vol_snapshots_hook($vmid, $snap, $running, "after-unfreeze");
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs
  2026-01-02 14:35 [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
                   ` (8 preceding siblings ...)
  2026-01-02 14:35 ` [pve-devel] [PATCH guest-common v4 1/1] abstract config: print when {, un}freezing a fs Maximiliano Sandoval
@ 2026-01-02 15:27 ` Maximiliano Sandoval
  2026-01-02 15:36   ` Fiona Ebner
  9 siblings, 1 reply; 12+ messages in thread
From: Maximiliano Sandoval @ 2026-01-02 15:27 UTC (permalink / raw)
  To: pve-devel

Maximiliano Sandoval <m.sandoval@proxmox.com> writes:

> ..and add more logging when issuing fsfreeze guest commands.
>
> The new setting takes precedence over freeze-fs-on-backup and deprecates the
> former.
>
> - At the moment taking a snapshot without RAM does not log whether there was a
>   freeze/thaw, we add logs when issuing freezes/thaws.
>
> - The patch does not result in an extra log line when making a Backup in
>   snapshot mode.
>
> - When it is easy to do so, we log if the fsfreeze command was not issued due to
>   mismatch between the agent running and the config, e.g. when say that we
>   skipped it if the agent is enabled bu the configuration says we shouldn't.

@fiona, one thing I just noticed is that `import_from_volid` calls
clone_disk() with $src_config->{'agent'} as an argument.

- Is this OK as-is, or should it also take into account the new
  guest-fsfreeze setting?
- What operations would trigger this codepath?

-- 
Maximiliano


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs
  2026-01-02 15:27 ` [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
@ 2026-01-02 15:36   ` Fiona Ebner
  0 siblings, 0 replies; 12+ messages in thread
From: Fiona Ebner @ 2026-01-02 15:36 UTC (permalink / raw)
  To: Maximiliano Sandoval, pve-devel

Am 02.01.26 um 4:26 PM schrieb Maximiliano Sandoval:
> Maximiliano Sandoval <m.sandoval@proxmox.com> writes:
> 
>> ..and add more logging when issuing fsfreeze guest commands.
>>
>> The new setting takes precedence over freeze-fs-on-backup and deprecates the
>> former.
>>
>> - At the moment taking a snapshot without RAM does not log whether there was a
>>   freeze/thaw, we add logs when issuing freezes/thaws.
>>
>> - The patch does not result in an extra log line when making a Backup in
>>   snapshot mode.
>>
>> - When it is easy to do so, we log if the fsfreeze command was not issued due to
>>   mismatch between the agent running and the config, e.g. when say that we
>>   skipped it if the agent is enabled bu the configuration says we shouldn't.
> 
> @fiona, one thing I just noticed is that `import_from_volid` calls
> clone_disk() with $src_config->{'agent'} as an argument.
> 
> - Is this OK as-is, or should it also take into account the new
>   guest-fsfreeze setting?
> - What operations would trigger this codepath?

Good catch! I think it should also take into account the new setting,
since it's also intended to be used in situation where freeze might not
even work correctly.

The code path is reached when updating a disk key using the
'import-from' property with the source volume being currently attached
to a running VM.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-01-02 15:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-02 14:35 [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 1/8] add a guest-fsfreeze qga setting Maximiliano Sandoval
2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 2/8] api: clone_vm: follow guest-fsfreeze setting Maximiliano Sandoval
2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 3/8] fix #1964: follow guest-fsfreeze setting on check freeze needed Maximiliano Sandoval
2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 4/8] agent: add a guest_fsthaw helper Maximiliano Sandoval
2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 5/8] port users of guest-fsfreeze-thaw users to helper Maximiliano Sandoval
2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 6/8] block job: log when a fsfreeze could not happen Maximiliano Sandoval
2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 7/8] block job: mirror: reword fsfreeze log entry Maximiliano Sandoval
2026-01-02 14:35 ` [pve-devel] [PATCH qemu-server v4 8/8] deprecate freeze-fs-on-backup qga setting Maximiliano Sandoval
2026-01-02 14:35 ` [pve-devel] [PATCH guest-common v4 1/1] abstract config: print when {, un}freezing a fs Maximiliano Sandoval
2026-01-02 15:27 ` [pve-devel] [PATCH guest-common/qemu-server v4 0/9] fix #1964: add setting to always disable freezing a guest's fs Maximiliano Sandoval
2026-01-02 15:36   ` 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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal