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>
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);