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

Fabian Ebner f.ebner at proxmox.com
Wed May 20 10:20:36 CEST 2020


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

This is a re-send of a previously stand-alone patch.

 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