* [pve-devel] [PATCH qemu-server v2 1/6] add a guest-fsfreeze qga setting
2025-09-02 12:45 [pve-devel] [PATCH container/guest-common/qemu-server v2 0/8] fix #1964: Add a setting to globally disable freezing a guest Maximiliano Sandoval
@ 2025-09-02 12:45 ` Maximiliano Sandoval
2025-09-02 14:43 ` Daniel Kral
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 2/6] block job: mirror: follow guest-fsfreeze setting Maximiliano Sandoval
` (7 subsequent siblings)
8 siblings, 1 reply; 13+ messages in thread
From: Maximiliano Sandoval @ 2025-09-02 12:45 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.pm | 11 +++++++++++
src/PVE/VZDump/QemuServer.pm | 6 +++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index f263fedb..cdd44eb0 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -167,6 +167,17 @@ my $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 "
+ . "fsfreeze-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"
+ . "Takes preference over 'freeze-fs-on-backup' when set.",
+ 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 5b94c369..2879639a 100644
--- a/src/PVE/VZDump/QemuServer.pm
+++ b/src/PVE/VZDump/QemuServer.pm
@@ -1096,7 +1096,11 @@ sub qga_fs_freeze {
return;
}
- my $freeze = PVE::QemuServer::get_qga_key($self->{vmlist}->{$vmid}, 'freeze-fs-on-backup') // 1;
+ my $freze_fs_on_backup =
+ PVE::QemuServer::get_qga_key($self->{vmlist}->{$vmid}, 'freeze-fs-on-backup');
+ my $guest_fsfreeze = PVE::QemuServer::get_qga_key($self->{vmlist}->{$vmid}, 'guest-fsfreeze');
+
+ my $freeze = $guest_fsfreeze // $freze_fs_on_backup // 1;
if (!$freeze) {
$self->loginfo("skipping guest-agent 'fs-freeze', disabled in VM options");
return;
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [pve-devel] [PATCH qemu-server v2 1/6] add a guest-fsfreeze qga setting
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 1/6] add a guest-fsfreeze qga setting Maximiliano Sandoval
@ 2025-09-02 14:43 ` Daniel Kral
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Kral @ 2025-09-02 14:43 UTC (permalink / raw)
To: Proxmox VE development discussion; +Cc: pve-devel
On Tue Sep 2, 2025 at 2:45 PM CEST, Maximiliano Sandoval wrote:
> 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.pm | 11 +++++++++++
> src/PVE/VZDump/QemuServer.pm | 6 +++++-
> 2 files changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
> index f263fedb..cdd44eb0 100644
> --- a/src/PVE/QemuServer.pm
> +++ b/src/PVE/QemuServer.pm
> @@ -167,6 +167,17 @@ my $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 "
> + . "fsfreeze-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"
> + . "Takes preference over 'freeze-fs-on-backup' when set.",
'Takes preference over' should be 'Takes precedence over'.
nit: But I think it'd be easier for users to understand something like
When this property/option is set, it will override the setting of
'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 5b94c369..2879639a 100644
> --- a/src/PVE/VZDump/QemuServer.pm
> +++ b/src/PVE/VZDump/QemuServer.pm
> @@ -1096,7 +1096,11 @@ sub qga_fs_freeze {
> return;
> }
>
> - my $freeze = PVE::QemuServer::get_qga_key($self->{vmlist}->{$vmid}, 'freeze-fs-on-backup') // 1;
> + my $freze_fs_on_backup =
s/freze/freeze/
> + PVE::QemuServer::get_qga_key($self->{vmlist}->{$vmid}, 'freeze-fs-on-backup');
> + my $guest_fsfreeze = PVE::QemuServer::get_qga_key($self->{vmlist}->{$vmid}, 'guest-fsfreeze');
> +
> + my $freeze = $guest_fsfreeze // $freze_fs_on_backup // 1;
could also just be
my $freeze = PVE::QemuServer::get_qga_key($self->{vmlist}->{$vmid}, 'guest-fsfreeze');
$freeze //= PVE::QemuServer::get_qga_key($self->{vmlist}->{$vmid}, 'freeze-fs-on-backup');
$freeze //= 1;
or something like that to not have unnecessary temporary variables.
> if (!$freeze) {
> $self->loginfo("skipping guest-agent 'fs-freeze', disabled in VM options");
> return;
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* [pve-devel] [PATCH qemu-server v2 2/6] block job: mirror: follow guest-fsfreeze setting
2025-09-02 12:45 [pve-devel] [PATCH container/guest-common/qemu-server v2 0/8] fix #1964: Add a setting to globally disable freezing a guest Maximiliano Sandoval
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 1/6] add a guest-fsfreeze qga setting Maximiliano Sandoval
@ 2025-09-02 12:45 ` Maximiliano Sandoval
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 3/6] fix #1964: follow guest-fsfreeze setting on check freeze needed Maximiliano Sandoval
` (6 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Maximiliano Sandoval @ 2025-09-02 12:45 UTC (permalink / raw)
To: pve-devel
This is used when performing a full-clone of a running VM.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
src/PVE/QemuServer/BlockJob.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/PVE/QemuServer/BlockJob.pm b/src/PVE/QemuServer/BlockJob.pm
index 633c0b34..b6e2d51f 100644
--- a/src/PVE/QemuServer/BlockJob.pm
+++ b/src/PVE/QemuServer/BlockJob.pm
@@ -162,8 +162,10 @@ sub qemu_drive_mirror_monitor {
last if $completion eq 'skip' || $completion eq 'auto';
if ($vmiddst && $vmiddst != $vmid) {
+ my $config = PVE::QemuConfig->load_config($vmid);
+ my $fsfreeze = PVE::QemuServer::get_qga_key($config, 'guest-fsfreeze') // 1;
my $agent_running = $qga && qga_check_running($vmid);
- if ($agent_running) {
+ if ($agent_running && $fsfreeze) {
print "freeze filesystem\n";
eval { mon_cmd($vmid, "guest-fsfreeze-freeze"); };
warn $@ if $@;
@@ -176,7 +178,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 ($agent_running && $fsfreeze) {
print "unfreeze filesystem\n";
eval { mon_cmd($vmid, "guest-fsfreeze-thaw"); };
warn $@ if $@;
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* [pve-devel] [PATCH qemu-server v2 3/6] fix #1964: follow guest-fsfreeze setting on check freeze needed
2025-09-02 12:45 [pve-devel] [PATCH container/guest-common/qemu-server v2 0/8] fix #1964: Add a setting to globally disable freezing a guest Maximiliano Sandoval
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 1/6] add a guest-fsfreeze qga setting Maximiliano Sandoval
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 2/6] block job: mirror: follow guest-fsfreeze setting Maximiliano Sandoval
@ 2025-09-02 12:45 ` Maximiliano Sandoval
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 4/6] log when issuing a guest-fsfreeze command Maximiliano Sandoval
` (5 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Maximiliano Sandoval @ 2025-09-02 12:45 UTC (permalink / raw)
To: pve-devel
This is used by replication and snapshots.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
src/PVE/QemuConfig.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm
index e0853d65..51593b60 100644
--- a/src/PVE/QemuConfig.pm
+++ b/src/PVE/QemuConfig.pm
@@ -291,12 +291,15 @@ sub __snapshot_check_freeze_needed {
my ($class, $vmid, $config, $save_vmstate) = @_;
my $running = $class->__snapshot_check_running($vmid);
+ my $vm_config = PVE::QemuConfig->load_config($vmid);
+ my $fsfreeze = PVE::QemuServer::get_qga_key($vm_config, 'guest-fsfreeze') // 1;
if (!$save_vmstate) {
return (
$running,
$running
&& PVE::QemuServer::parse_guest_agent($config)->{enabled}
- && PVE::QemuServer::Agent::qga_check_running($vmid),
+ && PVE::QemuServer::Agent::qga_check_running($vmid)
+ && $fsfreeze,
);
} else {
return ($running, 0);
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* [pve-devel] [PATCH qemu-server v2 4/6] log when issuing a guest-fsfreeze command
2025-09-02 12:45 [pve-devel] [PATCH container/guest-common/qemu-server v2 0/8] fix #1964: Add a setting to globally disable freezing a guest Maximiliano Sandoval
` (2 preceding siblings ...)
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 3/6] fix #1964: follow guest-fsfreeze setting on check freeze needed Maximiliano Sandoval
@ 2025-09-02 12:45 ` Maximiliano Sandoval
2025-09-02 14:47 ` Daniel Kral
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 5/6] block job: mirror: reword fsfreeze log entry Maximiliano Sandoval
` (4 subsequent siblings)
8 siblings, 1 reply; 13+ messages in thread
From: Maximiliano Sandoval @ 2025-09-02 12:45 UTC (permalink / raw)
To: pve-devel
These messages appear during replication or snapshots.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
src/PVE/QemuConfig.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm
index 51593b60..679c3893 100644
--- a/src/PVE/QemuConfig.pm
+++ b/src/PVE/QemuConfig.pm
@@ -310,9 +310,11 @@ sub __snapshot_freeze {
my ($class, $vmid, $unfreeze) = @_;
if ($unfreeze) {
+ print "issuing guest agent 'guest-fsfreeze-thaw' command\n";
eval { mon_cmd($vmid, "guest-fsfreeze-thaw"); };
warn "guest-fsfreeze-thaw problems - $@" if $@;
} else {
+ print "issuing guest agent 'guest-fsfreeze-freeze' command\n";
eval { mon_cmd($vmid, "guest-fsfreeze-freeze"); };
warn "guest-fsfreeze-freeze problems - $@" if $@;
}
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [pve-devel] [PATCH qemu-server v2 4/6] log when issuing a guest-fsfreeze command
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 4/6] log when issuing a guest-fsfreeze command Maximiliano Sandoval
@ 2025-09-02 14:47 ` Daniel Kral
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Kral @ 2025-09-02 14:47 UTC (permalink / raw)
To: Proxmox VE development discussion; +Cc: pve-devel
On Tue Sep 2, 2025 at 2:45 PM CEST, Maximiliano Sandoval wrote:
> These messages appear during replication or snapshots.
nit: would be nice to also document that moving the logging from
PVE::Replication::replicate(...) here now makes the messages appear
at all call sites of __snapshot_freeze(...).
The commit messages indicated to me that it has already been that way
before.
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
> src/PVE/QemuConfig.pm | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/PVE/QemuConfig.pm b/src/PVE/QemuConfig.pm
> index 51593b60..679c3893 100644
> --- a/src/PVE/QemuConfig.pm
> +++ b/src/PVE/QemuConfig.pm
> @@ -310,9 +310,11 @@ sub __snapshot_freeze {
> my ($class, $vmid, $unfreeze) = @_;
>
> if ($unfreeze) {
> + print "issuing guest agent 'guest-fsfreeze-thaw' command\n";
> eval { mon_cmd($vmid, "guest-fsfreeze-thaw"); };
> warn "guest-fsfreeze-thaw problems - $@" if $@;
> } else {
> + print "issuing guest agent 'guest-fsfreeze-freeze' command\n";
> eval { mon_cmd($vmid, "guest-fsfreeze-freeze"); };
> warn "guest-fsfreeze-freeze problems - $@" if $@;
> }
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* [pve-devel] [PATCH qemu-server v2 5/6] block job: mirror: reword fsfreeze log entry
2025-09-02 12:45 [pve-devel] [PATCH container/guest-common/qemu-server v2 0/8] fix #1964: Add a setting to globally disable freezing a guest Maximiliano Sandoval
` (3 preceding siblings ...)
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 4/6] log when issuing a guest-fsfreeze command Maximiliano Sandoval
@ 2025-09-02 12:45 ` Maximiliano Sandoval
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 6/6] deprecate freeze-fs-on-backup qga setting Maximiliano Sandoval
` (3 subsequent siblings)
8 siblings, 0 replies; 13+ messages in thread
From: Maximiliano Sandoval @ 2025-09-02 12:45 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 b6e2d51f..229146b3 100644
--- a/src/PVE/QemuServer/BlockJob.pm
+++ b/src/PVE/QemuServer/BlockJob.pm
@@ -166,7 +166,7 @@ sub qemu_drive_mirror_monitor {
my $fsfreeze = PVE::QemuServer::get_qga_key($config, 'guest-fsfreeze') // 1;
my $agent_running = $qga && qga_check_running($vmid);
if ($agent_running && $fsfreeze) {
- print "freeze filesystem\n";
+ print "issuing guest agent 'guest-fsfreeze-freeze' command\n";
eval { mon_cmd($vmid, "guest-fsfreeze-freeze"); };
warn $@ if $@;
} else {
@@ -179,7 +179,7 @@ sub qemu_drive_mirror_monitor {
qemu_blockjobs_cancel($vmid, $jobs);
if ($agent_running && $fsfreeze) {
- print "unfreeze filesystem\n";
+ print "issuing guest agent 'guest-fsfreeze-thaw' command\n";
eval { mon_cmd($vmid, "guest-fsfreeze-thaw"); };
warn $@ if $@;
} else {
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* [pve-devel] [PATCH qemu-server v2 6/6] deprecate freeze-fs-on-backup qga setting
2025-09-02 12:45 [pve-devel] [PATCH container/guest-common/qemu-server v2 0/8] fix #1964: Add a setting to globally disable freezing a guest Maximiliano Sandoval
` (4 preceding siblings ...)
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 5/6] block job: mirror: reword fsfreeze log entry Maximiliano Sandoval
@ 2025-09-02 12:45 ` Maximiliano Sandoval
2025-09-02 14:47 ` Daniel Kral
2025-09-02 12:45 ` [pve-devel] [PATCH container v2 1/1] log when freezing/thawing filesystem Maximiliano Sandoval
` (2 subsequent siblings)
8 siblings, 1 reply; 13+ messages in thread
From: Maximiliano Sandoval @ 2025-09-02 12:45 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
src/PVE/QemuServer.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index cdd44eb0..b8416b4c 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -161,8 +161,10 @@ my $agent_fmt = {
optional => 1,
default => 0,
},
+ # TODO Remove in Proxmox VE 10
'freeze-fs-on-backup' => {
- description => "Freeze/thaw guest filesystems on backup for consistency.",
+ description => "Freeze/thaw guest filesystems on backup for consistency.\n\n"
+ . "Deprecated: Use 'guest-fsfreeze' instead",
type => 'boolean',
optional => 1,
default => 1,
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [pve-devel] [PATCH qemu-server v2 6/6] deprecate freeze-fs-on-backup qga setting
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 6/6] deprecate freeze-fs-on-backup qga setting Maximiliano Sandoval
@ 2025-09-02 14:47 ` Daniel Kral
0 siblings, 0 replies; 13+ messages in thread
From: Daniel Kral @ 2025-09-02 14:47 UTC (permalink / raw)
To: Proxmox VE development discussion; +Cc: pve-devel
On Tue Sep 2, 2025 at 2:45 PM CEST, Maximiliano Sandoval wrote:
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
> src/PVE/QemuServer.pm | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
> index cdd44eb0..b8416b4c 100644
> --- a/src/PVE/QemuServer.pm
> +++ b/src/PVE/QemuServer.pm
> @@ -161,8 +161,10 @@ my $agent_fmt = {
> optional => 1,
> default => 0,
> },
> + # TODO Remove in Proxmox VE 10
> 'freeze-fs-on-backup' => {
> - description => "Freeze/thaw guest filesystems on backup for consistency.",
> + description => "Freeze/thaw guest filesystems on backup for consistency.\n\n"
> + . "Deprecated: Use 'guest-fsfreeze' instead",
nit: end the deprecation notice with a full-stop
also seems like we put the deprecation notice at the start instead of
the end, at least what I found with a quick grep over all PVE repos
(exception: qm's bootdisk):
Deprecated: Use 'guest-fsfreeze' instead. Freeze/thaw guest
filesystems on backup for consistency.
> type => 'boolean',
> optional => 1,
> default => 1,
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* [pve-devel] [PATCH container v2 1/1] log when freezing/thawing filesystem
2025-09-02 12:45 [pve-devel] [PATCH container/guest-common/qemu-server v2 0/8] fix #1964: Add a setting to globally disable freezing a guest Maximiliano Sandoval
` (5 preceding siblings ...)
2025-09-02 12:45 ` [pve-devel] [PATCH qemu-server v2 6/6] deprecate freeze-fs-on-backup qga setting Maximiliano Sandoval
@ 2025-09-02 12:45 ` Maximiliano Sandoval
2025-09-02 12:45 ` [pve-devel] [PATCH guest-common v2 1/1] replication: remove logging when freezing/thawing Maximiliano Sandoval
2025-09-02 15:36 ` [pve-devel] [PATCH container/guest-common/qemu-server v2 0/8] fix #1964: Add a setting to globally disable freezing a guest Daniel Kral
8 siblings, 0 replies; 13+ messages in thread
From: Maximiliano Sandoval @ 2025-09-02 12:45 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
src/PVE/LXC/Config.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index e4d0365..79a87b8 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -204,10 +204,12 @@ sub __snapshot_freeze {
};
if ($unfreeze) {
+ print "thawing guest filesystem\n";
eval { PVE::LXC::thaw($vmid); };
warn $@ if $@;
$freeze_mountpoints->(1);
} else {
+ print "freezing guest filesystem\n";
PVE::LXC::freeze($vmid);
PVE::LXC::sync_container_namespace($vmid);
$freeze_mountpoints->(0);
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* [pve-devel] [PATCH guest-common v2 1/1] replication: remove logging when freezing/thawing
2025-09-02 12:45 [pve-devel] [PATCH container/guest-common/qemu-server v2 0/8] fix #1964: Add a setting to globally disable freezing a guest Maximiliano Sandoval
` (6 preceding siblings ...)
2025-09-02 12:45 ` [pve-devel] [PATCH container v2 1/1] log when freezing/thawing filesystem Maximiliano Sandoval
@ 2025-09-02 12:45 ` Maximiliano Sandoval
2025-09-02 15:36 ` [pve-devel] [PATCH container/guest-common/qemu-server v2 0/8] fix #1964: Add a setting to globally disable freezing a guest Daniel Kral
8 siblings, 0 replies; 13+ messages in thread
From: Maximiliano Sandoval @ 2025-09-02 12:45 UTC (permalink / raw)
To: pve-devel
This is handled now by the class' __snapshot_freeze.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
src/PVE/Replication.pm | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/PVE/Replication.pm b/src/PVE/Replication.pm
index ba4c2c1..1b31ae2 100644
--- a/src/PVE/Replication.pm
+++ b/src/PVE/Replication.pm
@@ -376,7 +376,6 @@ sub replicate {
# freeze filesystem for data consistency
if ($freezefs) {
- $logfunc->("freeze guest filesystem");
$guest_class->__snapshot_freeze($vmid, 0);
}
@@ -395,7 +394,6 @@ sub replicate {
# thaw immediately
if ($freezefs) {
- $logfunc->("thaw guest filesystem");
$guest_class->__snapshot_freeze($vmid, 1);
}
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [pve-devel] [PATCH container/guest-common/qemu-server v2 0/8] fix #1964: Add a setting to globally disable freezing a guest
2025-09-02 12:45 [pve-devel] [PATCH container/guest-common/qemu-server v2 0/8] fix #1964: Add a setting to globally disable freezing a guest Maximiliano Sandoval
` (7 preceding siblings ...)
2025-09-02 12:45 ` [pve-devel] [PATCH guest-common v2 1/1] replication: remove logging when freezing/thawing Maximiliano Sandoval
@ 2025-09-02 15:36 ` Daniel Kral
8 siblings, 0 replies; 13+ messages in thread
From: Daniel Kral @ 2025-09-02 15:36 UTC (permalink / raw)
To: Proxmox VE development discussion; +Cc: pve-devel
On Tue Sep 2, 2025 at 2:45 PM CEST, Maximiliano Sandoval wrote:
> ..and add more logging when issuing fsfreeze guest commands.
>
> The setting takes preference 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.
>
> - The patch does result in an extra log line when making a Backup in snapshot mode.
>
> Differences from v1:
> - Add setting to enable/disable fsfreeze commands
> - Change wording in one log message
Tested the series with a VM and a container and it worked as was
expected for both. Tested that guest-fsfreeze=0 correctly overrides
fs-freeze-on-backup too and checked that all the log messages appear for
backups, clones, and snapshots with vmstate=0.
Didn't have a cluster ready today where I could check whether the option
is also correctly checked for replication too, but I'll see that I get
to that tomorrow.
With the few inline comments addressed, consider this:
Tested-by: Daniel Kral <d.kral@proxmox.com>
Reviewed-by: Daniel Kral <d.kral@proxmox.com>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread