]> git.proxmox.com Git - qemu-server.git/commitdiff
migrate: fix memory migration start time
authorFabian Ebner <f.ebner@proxmox.com>
Fri, 23 Apr 2021 12:31:40 +0000 (14:31 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 23 Apr 2021 13:00:44 +0000 (15:00 +0200)
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 <f.ebner@proxmox.com>
PVE/QemuMigrate.pm

index 6455182455e038c3442599d32f5ae9449e2880d0..e9bcade2a07a4c771a96ad7f93551717aefe1eef 100644 (file)
@@ -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);