]> git.proxmox.com Git - qemu-server.git/commitdiff
migrate: skip rescan for efidisk and shared volumes
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 30 Apr 2020 10:44:48 +0000 (12:44 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 4 May 2020 15:35:12 +0000 (17:35 +0200)
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 <d.csapak@proxmox.com>
PVE/QemuMigrate.pm

index d9b104c902c6b147cb543067eafaede1e16cb76c..fa5df9bf0f65690370da63a37f8a11df7defa695 100644 (file)
@@ -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);