[pve-devel] [PATCH qemu-server] sync_disks: fix check

Fabian Ebner f.ebner at proxmox.com
Wed May 13 12:18:04 CEST 2020


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

The real issue is that the shared volumes are scanned here and
that happens in the scan_volids call above. I'll try to address
that as part of the sync_disks cleanup I'm working on.

 PVE/QemuMigrate.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index b729940..f6baeda 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -519,7 +519,9 @@ sub sync_disks {
 	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 $volid = $drive->{file};
+	    return if !defined($local_volumes->{$volid}); # only update sizes for local volumes
 
 	    my ($updated, $old_size, $new_size) = PVE::QemuServer::Drive::update_disksize($drive, $volid_hash);
 	    if (defined($updated)) {
-- 
2.20.1





More information about the pve-devel mailing list