* [PATCH guest-common 0/2] fix #1964: replication config: add a setting to skip freezing guest filesystems
@ 2026-07-06 14:03 Maximiliano Sandoval
2026-07-06 14:03 ` [PATCH guest-common 1/2] replication config: remove unused Data::Dumper Maximiliano Sandoval
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Maximiliano Sandoval @ 2026-07-06 14:03 UTC (permalink / raw)
To: pve-devel
See the second commit message for more information.
We sneak a change removing an unused Data::Dumper import.
Tested:
- Created a VM with ID 101 in a cluster with nodes pve1 and pve2
- Enabled the QGA service inside the guest
- Created a replication job with
pve2 $ pvesr create-local-job 101-1 pve1 --skip-freeze-fs 1 --schedule '*/1'
- Start the VM
- Ran: pvesr schedule-now 101-1
- cat /var/log/pve/replicate/101-1
- checked that it contains the added line in the logs.
Then repeated the whole thing without specifying --skip-freeze-fs to ensure
nothing was broken.
Maximiliano Sandoval (2):
replication config: remove unused Data::Dumper
fix #1964: replication config: add a setting to skip freezing guest
filesystems
src/PVE/Replication.pm | 7 +++++++
src/PVE/ReplicationConfig.pm | 9 ++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
--
2.47.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH guest-common 1/2] replication config: remove unused Data::Dumper
2026-07-06 14:03 [PATCH guest-common 0/2] fix #1964: replication config: add a setting to skip freezing guest filesystems Maximiliano Sandoval
@ 2026-07-06 14:03 ` Maximiliano Sandoval
2026-10-22 11:49 ` applied: " Fiona Ebner
2026-07-06 14:03 ` [PATCH guest-common 2/2] fix #1964: replication config: add a setting to skip freezing guest filesystems Maximiliano Sandoval
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Maximiliano Sandoval @ 2026-07-06 14:03 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
src/PVE/ReplicationConfig.pm | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/PVE/ReplicationConfig.pm b/src/PVE/ReplicationConfig.pm
index 5533033..cf9ee01 100644
--- a/src/PVE/ReplicationConfig.pm
+++ b/src/PVE/ReplicationConfig.pm
@@ -2,7 +2,6 @@ package PVE::ReplicationConfig;
use strict;
use warnings;
-use Data::Dumper;
use PVE::Tools;
use PVE::JSONSchema qw(get_standard_option);
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH guest-common 2/2] fix #1964: replication config: add a setting to skip freezing guest filesystems
2026-07-06 14:03 [PATCH guest-common 0/2] fix #1964: replication config: add a setting to skip freezing guest filesystems Maximiliano Sandoval
2026-07-06 14:03 ` [PATCH guest-common 1/2] replication config: remove unused Data::Dumper Maximiliano Sandoval
@ 2026-07-06 14:03 ` Maximiliano Sandoval
2026-10-22 11:55 ` Fiona Ebner
2026-10-22 10:24 ` [PATCH guest-common 0/2] " Shannon Sterz
2026-10-22 13:02 ` superseded: " Maximiliano Sandoval
3 siblings, 1 reply; 8+ messages in thread
From: Maximiliano Sandoval @ 2026-07-06 14:03 UTC (permalink / raw)
To: pve-devel
We log an entry when a freeze would have happened and we skip it based on
replication.cfg.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
src/PVE/Replication.pm | 7 +++++++
src/PVE/ReplicationConfig.pm | 8 ++++++++
2 files changed, 15 insertions(+)
diff --git a/src/PVE/Replication.pm b/src/PVE/Replication.pm
index ba4c2c1..79f0be4 100644
--- a/src/PVE/Replication.pm
+++ b/src/PVE/Replication.pm
@@ -300,6 +300,13 @@ sub replicate {
my $conf = $guest_class->load_config($vmid);
my ($running, $freezefs) = $guest_class->__snapshot_check_freeze_needed($vmid, $conf, 0);
+ if ($jobcfg->{'skip-freeze-fs'}) {
+ $logfunc->(
+ "replication job configured with 'skip-freeze-fs' enabled, not freezing guest filesystems"
+ ) if $freezefs;
+ $freezefs = 0;
+ }
+
my $volumes = $guest_class->get_replicatable_volumes(
$storecfg,
$vmid,
diff --git a/src/PVE/ReplicationConfig.pm b/src/PVE/ReplicationConfig.pm
index cf9ee01..fcedbfe 100644
--- a/src/PVE/ReplicationConfig.pm
+++ b/src/PVE/ReplicationConfig.pm
@@ -96,6 +96,13 @@ my $defaultData = {
format => 'pve-node',
optional => 1,
},
+ 'skip-freeze-fs' => {
+ description =>
+ "Wether to skip freezing & thawing the guest's filesystems during replication",
+ type => 'boolean',
+ optional => 1,
+ default => 0,
+ },
},
};
@@ -335,6 +342,7 @@ sub options {
schedule => { optional => 1 },
remove_job => { optional => 1 },
source => { optional => 1 },
+ 'skip-freeze-fs' => { optional => 1 },
};
}
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH guest-common 0/2] fix #1964: replication config: add a setting to skip freezing guest filesystems
2026-07-06 14:03 [PATCH guest-common 0/2] fix #1964: replication config: add a setting to skip freezing guest filesystems Maximiliano Sandoval
2026-07-06 14:03 ` [PATCH guest-common 1/2] replication config: remove unused Data::Dumper Maximiliano Sandoval
2026-07-06 14:03 ` [PATCH guest-common 2/2] fix #1964: replication config: add a setting to skip freezing guest filesystems Maximiliano Sandoval
@ 2026-10-22 10:24 ` Shannon Sterz
2026-10-22 10:27 ` Maximiliano Sandoval
2026-10-22 13:02 ` superseded: " Maximiliano Sandoval
3 siblings, 1 reply; 8+ messages in thread
From: Shannon Sterz @ 2026-10-22 10:24 UTC (permalink / raw)
To: Maximiliano Sandoval, pve-devel
On Mon Jul 6, 2026 at 4:03 PM CEST, Maximiliano Sandoval wrote:
> See the second commit message for more information.
>
> We sneak a change removing an unused Data::Dumper import.
>
> Tested:
>
> - Created a VM with ID 101 in a cluster with nodes pve1 and pve2
> - Enabled the QGA service inside the guest
> - Created a replication job with
>
> pve2 $ pvesr create-local-job 101-1 pve1 --skip-freeze-fs 1 --schedule '*/1'
>
> - Start the VM
> - Ran: pvesr schedule-now 101-1
> - cat /var/log/pve/replicate/101-1
> - checked that it contains the added line in the logs.
>
> Then repeated the whole thing without specifying --skip-freeze-fs to ensure
> nothing was broken.
>
> Maximiliano Sandoval (2):
> replication config: remove unused Data::Dumper
> fix #1964: replication config: add a setting to skip freezing guest
> filesystems
>
> src/PVE/Replication.pm | 7 +++++++
> src/PVE/ReplicationConfig.pm | 9 ++++++++-
> 2 files changed, 15 insertions(+), 1 deletion(-)
seems to work as advertised and the code changes seem to fairly straight
forward to me. so consider this:
Reviewed-by: Shannon Sterz <s.sterz@proxmox.com>
Tested-by: Shannon Sterz <s.sterz@proxmox.com>
one small thing i noticed is that if a node does not have the updated
package, editing the replication job through that node's ui will
silently drop the new option. however, that is unrelated to this series
and a more general issue. editing the job on a node with these changes
keeps the option in place as expected.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH guest-common 0/2] fix #1964: replication config: add a setting to skip freezing guest filesystems
2026-10-22 10:24 ` [PATCH guest-common 0/2] " Shannon Sterz
@ 2026-10-22 10:27 ` Maximiliano Sandoval
0 siblings, 0 replies; 8+ messages in thread
From: Maximiliano Sandoval @ 2026-10-22 10:27 UTC (permalink / raw)
To: Shannon Sterz; +Cc: pve-devel
"Shannon Sterz" <s.sterz@proxmox.com> writes:
> On Mon Jul 6, 2026 at 4:03 PM CEST, Maximiliano Sandoval wrote:
>> See the second commit message for more information.
>>
>> We sneak a change removing an unused Data::Dumper import.
>>
>> Tested:
>>
>> - Created a VM with ID 101 in a cluster with nodes pve1 and pve2
>> - Enabled the QGA service inside the guest
>> - Created a replication job with
>>
>> pve2 $ pvesr create-local-job 101-1 pve1 --skip-freeze-fs 1 --schedule '*/1'
>>
>> - Start the VM
>> - Ran: pvesr schedule-now 101-1
>> - cat /var/log/pve/replicate/101-1
>> - checked that it contains the added line in the logs.
>>
>> Then repeated the whole thing without specifying --skip-freeze-fs to ensure
>> nothing was broken.
>>
>> Maximiliano Sandoval (2):
>> replication config: remove unused Data::Dumper
>> fix #1964: replication config: add a setting to skip freezing guest
>> filesystems
>>
>> src/PVE/Replication.pm | 7 +++++++
>> src/PVE/ReplicationConfig.pm | 9 ++++++++-
>> 2 files changed, 15 insertions(+), 1 deletion(-)
>
> seems to work as advertised and the code changes seem to fairly straight
> forward to me. so consider this:
>
> Reviewed-by: Shannon Sterz <s.sterz@proxmox.com>
> Tested-by: Shannon Sterz <s.sterz@proxmox.com>
>
> one small thing i noticed is that if a node does not have the updated
> package, editing the replication job through that node's ui will
> silently drop the new option. however, that is unrelated to this series
> and a more general issue. editing the job on a node with these changes
> keeps the option in place as expected.
Thanks for the feedback. I noticed this morning that "wether" is a typo,
from the Cambridge Dictionary:
wether n.
a male sheep that has been castrated
I suppose that s/wether/whether/ can be done while applying.
This has been requested in the following support cases: #9211193,
#0063246, #5761134, #3261710.
--
Maximiliano
^ permalink raw reply [flat|nested] 8+ messages in thread
* applied: [PATCH guest-common 1/2] replication config: remove unused Data::Dumper
2026-07-06 14:03 ` [PATCH guest-common 1/2] replication config: remove unused Data::Dumper Maximiliano Sandoval
@ 2026-10-22 11:49 ` Fiona Ebner
0 siblings, 0 replies; 8+ messages in thread
From: Fiona Ebner @ 2026-10-22 11:49 UTC (permalink / raw)
To: pve-devel, Maximiliano Sandoval
Applied this one, thanks!
[1/2] replication config: remove unused Data::Dumper
commit: a9e15736e4a4d3831d02e8e6ecef57a76fdcf133
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH guest-common 2/2] fix #1964: replication config: add a setting to skip freezing guest filesystems
2026-07-06 14:03 ` [PATCH guest-common 2/2] fix #1964: replication config: add a setting to skip freezing guest filesystems Maximiliano Sandoval
@ 2026-10-22 11:55 ` Fiona Ebner
0 siblings, 0 replies; 8+ messages in thread
From: Fiona Ebner @ 2026-10-22 11:55 UTC (permalink / raw)
To: Maximiliano Sandoval, pve-devel
A UI patch would be nice to go along with this.
Am 06.07.26 um 4:03 PM schrieb Maximiliano Sandoval:
> We log an entry when a freeze would have happened and we skip it based on
> replication.cfg.
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
> src/PVE/Replication.pm | 7 +++++++
> src/PVE/ReplicationConfig.pm | 8 ++++++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/src/PVE/Replication.pm b/src/PVE/Replication.pm
> index ba4c2c1..79f0be4 100644
> --- a/src/PVE/Replication.pm
> +++ b/src/PVE/Replication.pm
> @@ -300,6 +300,13 @@ sub replicate {
>
> my $conf = $guest_class->load_config($vmid);
> my ($running, $freezefs) = $guest_class->__snapshot_check_freeze_needed($vmid, $conf, 0);
I think we should skip this call if the option is set. qemu-server's
guest_fs_freeze_applicable() might print an additional reason why freeze
is disabled (it does not actually end up in the replication log, because
the log function is not passed down the stack, but we probably should
change that - doesn't have to be this series), so that could be(come) a
bit confusing. The job-level setting has precedence for skipping, so I
think that should be what is logged.
There is __snapshot_check_running() so you can query the running state
independently.
It's not necessary to log that we skip freeze because of the setting if
the guest is not running.
> + if ($jobcfg->{'skip-freeze-fs'}) {
> + $logfunc->(
> + "replication job configured with 'skip-freeze-fs' enabled, not freezing guest filesystems"
> + ) if $freezefs;
Style nit: line too long, multiline post-if
> + $freezefs = 0;
> + }
> +
> my $volumes = $guest_class->get_replicatable_volumes(
> $storecfg,
> $vmid,
> diff --git a/src/PVE/ReplicationConfig.pm b/src/PVE/ReplicationConfig.pm
> index cf9ee01..fcedbfe 100644
> --- a/src/PVE/ReplicationConfig.pm
> +++ b/src/PVE/ReplicationConfig.pm
> @@ -96,6 +96,13 @@ my $defaultData = {
> format => 'pve-node',
> optional => 1,
> },
> + 'skip-freeze-fs' => {
> + description =>
> + "Wether to skip freezing & thawing the guest's filesystems during replication",
As you already noted: typo
Style nit: missing dot at the end, I would replace '&' with 'and', maybe
mention "for consistency"
I would suggest adding a verbose description to communicate how it
behaves if disabled, e.g. repeat the first line and then:
Disabling this setting does not enforce that a freeze happens for VMs.
For VMs, that also depends on the virtual machine's 'agent' settings for
the QEMU guest agent and the availability of the guest agent in the VM.
> + type => 'boolean',
> + optional => 1,
> + default => 0,
> + },
> },
> };
>
> @@ -335,6 +342,7 @@ sub options {
> schedule => { optional => 1 },
> remove_job => { optional => 1 },
> source => { optional => 1 },
> + 'skip-freeze-fs' => { optional => 1 },
> };
> }
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* superseded: [PATCH guest-common 0/2] fix #1964: replication config: add a setting to skip freezing guest filesystems
2026-07-06 14:03 [PATCH guest-common 0/2] fix #1964: replication config: add a setting to skip freezing guest filesystems Maximiliano Sandoval
` (2 preceding siblings ...)
2026-10-22 10:24 ` [PATCH guest-common 0/2] " Shannon Sterz
@ 2026-10-22 13:02 ` Maximiliano Sandoval
3 siblings, 0 replies; 8+ messages in thread
From: Maximiliano Sandoval @ 2026-10-22 13:02 UTC (permalink / raw)
To: pve-devel
Maximiliano Sandoval <m.sandoval@proxmox.com> writes:
> See the second commit message for more information.
>
> We sneak a change removing an unused Data::Dumper import.
>
> Tested:
>
> - Created a VM with ID 101 in a cluster with nodes pve1 and pve2
> - Enabled the QGA service inside the guest
> - Created a replication job with
>
> pve2 $ pvesr create-local-job 101-1 pve1 --skip-freeze-fs 1 --schedule '*/1'
>
> - Start the VM
> - Ran: pvesr schedule-now 101-1
> - cat /var/log/pve/replicate/101-1
> - checked that it contains the added line in the logs.
>
> Then repeated the whole thing without specifying --skip-freeze-fs to ensure
> nothing was broken.
>
> Maximiliano Sandoval (2):
> replication config: remove unused Data::Dumper
> fix #1964: replication config: add a setting to skip freezing guest
> filesystems
>
> src/PVE/Replication.pm | 7 +++++++
> src/PVE/ReplicationConfig.pm | 9 ++++++++-
> 2 files changed, 15 insertions(+), 1 deletion(-)
@fiona I will try to do a UI patch as soon as I have the time.
Superseded-by: https://lore.proxmox.com/all/20261022130057.361389-1-m.sandoval@proxmox.com/T/#u
--
Maximiliano
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-10-22 13:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06 14:03 [PATCH guest-common 0/2] fix #1964: replication config: add a setting to skip freezing guest filesystems Maximiliano Sandoval
2026-07-06 14:03 ` [PATCH guest-common 1/2] replication config: remove unused Data::Dumper Maximiliano Sandoval
2026-10-22 11:49 ` applied: " Fiona Ebner
2026-07-06 14:03 ` [PATCH guest-common 2/2] fix #1964: replication config: add a setting to skip freezing guest filesystems Maximiliano Sandoval
2026-10-22 11:55 ` Fiona Ebner
2026-10-22 10:24 ` [PATCH guest-common 0/2] " Shannon Sterz
2026-10-22 10:27 ` Maximiliano Sandoval
2026-10-22 13:02 ` superseded: " Maximiliano Sandoval
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox