* [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
2026-07-06 14:03 ` [PATCH guest-common 2/2] fix #1964: replication config: add a setting to skip freezing guest filesystems Maximiliano Sandoval
0 siblings, 2 replies; 3+ 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] 3+ 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-07-06 14:03 ` [PATCH guest-common 2/2] fix #1964: replication config: add a setting to skip freezing guest filesystems Maximiliano Sandoval
1 sibling, 0 replies; 3+ 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] 3+ 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
1 sibling, 0 replies; 3+ 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] 3+ messages in thread
end of thread, other threads:[~2026-07-06 14:04 UTC | newest]
Thread overview: 3+ 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-07-06 14:03 ` [PATCH guest-common 2/2] fix #1964: replication config: add a setting to skip freezing guest filesystems Maximiliano Sandoval
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox