From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id B2A7B1FF184 for ; Thu, 4 Dec 2025 15:02:52 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 52546A07; Thu, 4 Dec 2025 15:03:16 +0100 (CET) Message-ID: <850c27e2-3635-4b1d-9335-19c8c7c9d32c@proxmox.com> Date: Thu, 4 Dec 2025 15:02:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion , Maximiliano Sandoval References: <20251014122718.374205-1-m.sandoval@proxmox.com> <20251014122718.374205-3-m.sandoval@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20251014122718.374205-3-m.sandoval@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1764856916947 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.017 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH qemu-server v3 2/7] block job: mirror: follow guest-fsfreeze setting X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Am 14.10.25 um 2:27 PM schrieb Maximiliano Sandoval: > This is used when performing a full-clone of a running VM. > > Signed-off-by: Maximiliano Sandoval > --- > src/PVE/QemuServer/BlockJob.pm | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/src/PVE/QemuServer/BlockJob.pm b/src/PVE/QemuServer/BlockJob.pm > index 506010e1..5a4b416e 100644 > --- a/src/PVE/QemuServer/BlockJob.pm > +++ b/src/PVE/QemuServer/BlockJob.pm > @@ -162,8 +162,11 @@ sub qemu_drive_mirror_monitor { > last if $completion eq 'skip' || $completion eq 'auto'; > > if ($vmiddst && $vmiddst != $vmid) { > + my $config = PVE::QemuConfig->load_config($vmid); Not a huge fan of loading the config this deep into a worker. That's not something usually done in our code base. Maybe we should rename the $qga param to indicate that it's specific to freeze and already check the config on the call sites (and also log there if skipped because disabled). We can still do a final check here if the guest agent is actually running and warn if not. > + my $fsfreeze = > + PVE::QemuServer::Agent::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 { PVE::QemuServer::Agent::guest_fsfreeze($vmid); }; > warn $@ if $@; > @@ -176,7 +179,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 $@; _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel