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 7681D76917 for ; Fri, 23 Apr 2021 14:31:48 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6A0AA28FBD for ; Fri, 23 Apr 2021 14:31:48 +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 EBFD228FB5 for ; Fri, 23 Apr 2021 14:31:47 +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 B8D2043508 for ; Fri, 23 Apr 2021 14:31:47 +0200 (CEST) From: Fabian Ebner To: pve-devel@lists.proxmox.com Date: Fri, 23 Apr 2021 14:31:40 +0200 Message-Id: <20210423123140.16319-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 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: [pve-devel] [PATCH qemu-server] migrate: fix memory migration start time 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: Fri, 23 Apr 2021 12:31:48 -0000 The variable is only ever used for calculating the average speed of memory migration, but it was set before disk mirroring already. But the disk sizes are not included in the calculation, resulting in (very) wrong values. Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 6455182..e9bcade 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -929,8 +929,6 @@ sub phase2 { $self->log('info', "start remote tunnel"); $self->start_remote_tunnel($raddr, $rport, $ruri, $unix_socket_info); - my $start = time(); - if ($self->{storage_migration}) { $self->{storage_migration_jobs} = {}; $self->log('info', "starting storage migration"); @@ -1025,6 +1023,8 @@ sub phase2 { } + my $start = time(); + $self->log('info', "start migrate command to $ruri"); eval { mon_cmd($vmid, "migrate", uri => $ruri); -- 2.20.1