From cd37203880ea6a587efe14ee362e69957f5b6ad2 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Thu, 30 Apr 2020 12:44:48 +0200 Subject: [PATCH] migrate: skip rescan for efidisk and shared volumes we really only want to rescan the disk size of the disks we actually need, and that are only the local disks (for which we have to allocate the correct size on the target) also we want to always skip the efidisk, since we get the wanted size after the loop, and this produced a confusing log line (for details why we do not want the 'real' size, see commit 818ce80ec1a89c4abee61145c858b9323180e31b) Signed-off-by: Dominik Csapak --- PVE/QemuMigrate.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index d9b104c9..fa5df9bf 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -518,6 +518,9 @@ sub sync_disks { my $volid_hash = PVE::QemuServer::scan_volids($storecfg, $vmid); PVE::QemuConfig->foreach_volume($conf, sub { my ($key, $drive) = @_; + return if $key eq 'efidisk0'; # skip efidisk, will be handled later + return if !defined($local_volumes->{$key}); # only update sizes for local volumes + my ($updated, $old_size, $new_size) = PVE::QemuServer::Drive::update_disksize($drive, $volid_hash); if (defined($updated)) { $conf->{$key} = PVE::QemuServer::print_drive($updated);