[pve-devel] [PATCH qemu-server v2 2/6] block job: mirror: follow guest-fsfreeze setting
Maximiliano Sandoval
m.sandoval at proxmox.com
Tue Sep 2 14:45:17 CEST 2025
This is used when performing a full-clone of a running VM.
Signed-off-by: Maximiliano Sandoval <m.sandoval at 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
More information about the pve-devel
mailing list