From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 52968E053 for ; Thu, 21 Apr 2022 09:21:09 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 469361B87E for ; Thu, 21 Apr 2022 09:20:39 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 8C9A61B873 for ; Thu, 21 Apr 2022 09:20:37 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 5EB3742584 for ; Thu, 21 Apr 2022 09:20:37 +0200 (CEST) Message-ID: <07464575-25ec-9a0e-5e93-cb89bcea1757@proxmox.com> Date: Thu, 21 Apr 2022 09:20:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Content-Language: en-US To: pve-devel@lists.proxmox.com, =?UTF-8?Q?Fabian_Gr=c3=bcnbichler?= References: <20220318075123.5445-1-f.ebner@proxmox.com> <1650457969.m5c6lqzh1t.astroid@nora.none> From: Fabian Ebner In-Reply-To: <1650457969.m5c6lqzh1t.astroid@nora.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 2.143 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -4.099 Looks like a legit reply (A) 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] migrate: keep VM paused after migration if it was before 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: , X-List-Received-Date: Thu, 21 Apr 2022 07:21:09 -0000 Am 20.04.22 um 14:43 schrieb Fabian Grünbichler: > On March 18, 2022 8:51 am, Fabian Ebner wrote: >> Also cannot issue a guest agent command in that case. >> >> Reported in the community forum: >> https://forum.proxmox.com/threads/106618 >> >> Signed-off-by: Fabian Ebner >> --- >> >> Best viewed with -w. >> >> PVE/QemuMigrate.pm | 54 ++++++++++++++++++++++++++-------------------- >> 1 file changed, 31 insertions(+), 23 deletions(-) > > patch looks good to me - it might make sense to restructure the > conditionals a bit to log that resuming/fstrim was skipped though to > reduce confusion (user that paused VM and user doing the migration might > not be the same entity after all)? Yes, I'll add a log line as a followup. > > one other thing I noticed (pre-existing, but the changes here made me > look and my search came up short), inside phase2: > > - start block job(s) without autocompletion and wait for them to > converge > - start RAM/state migration without autocompletion and wait for it to > converge > X both source and target VMs are paused now with "identical" state, > irrespective of the source being paused or not initially > - cancel block job(s) (to close NBD writer(s) so that switchover can > proceed in phase3_cleanup) > > if something happens after X in phase2, we enter phase2_cleanup, and > attempt to cancel the migration, remove the lock, cancel the block jobs > again, clean up bitmaps, stop the target VM, clean up remote disks, tear > down the tunnel, and effectively exit the migration at that point BUT - > we don't handle the paused state? is there a resume source (with this > patch, guarded by source was not paused) missing or am I missing > something? Quickly tested it, but there is no resume call for the source (with or without the patch) in this scenario. I don't think there is any real downside to try and resume on the source in phase2_cleanup().