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 932EEDE5F for ; Wed, 20 Apr 2022 14:44:04 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8914BB9A8 for ; Wed, 20 Apr 2022 14:44:04 +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 D5E29B99D for ; Wed, 20 Apr 2022 14:44:02 +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 A951642447 for ; Wed, 20 Apr 2022 14:44:02 +0200 (CEST) Date: Wed, 20 Apr 2022 14:43:55 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox VE development discussion References: <20220318075123.5445-1-f.ebner@proxmox.com> In-Reply-To: <20220318075123.5445-1-f.ebner@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1650457969.m5c6lqzh1t.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.177 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [qemumigrate.pm, proxmox.com] 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: Wed, 20 Apr 2022 12:44:04 -0000 On March 18, 2022 8:51 am, Fabian Ebner wrote: > Also cannot issue a guest agent command in that case. >=20 > Reported in the community forum: > https://forum.proxmox.com/threads/106618 >=20 > Signed-off-by: Fabian Ebner > --- >=20 > Best viewed with -w. >=20 > PVE/QemuMigrate.pm | 54 ++++++++++++++++++++++++++-------------------- > 1 file changed, 31 insertions(+), 23 deletions(-) patch looks good to me - it might make sense to restructure the=20 conditionals a bit to log that resuming/fstrim was skipped though to=20 reduce confusion (user that paused VM and user doing the migration might=20 not be the same entity after all)? one other thing I noticed (pre-existing, but the changes here made me=20 look and my search came up short), inside phase2: - start block job(s) without autocompletion and wait for them to=20 converge - start RAM/state migration without autocompletion and wait for it to=20 converge X both source and target VMs are paused now with "identical" state,=20 irrespective of the source being paused or not initially - cancel block job(s) (to close NBD writer(s) so that switchover can=20 proceed in phase3_cleanup) if something happens after X in phase2, we enter phase2_cleanup, and=20 attempt to cancel the migration, remove the lock, cancel the block jobs=20 again, clean up bitmaps, stop the target VM, clean up remote disks, tear=20 down the tunnel, and effectively exit the migration at that point BUT -=20 we don't handle the paused state? is there a resume source (with this=20 patch, guarded by source was not paused) missing or am I missing=20 something?