From: Thomas Lamprecht Date: Fri, 17 Apr 2020 13:27:38 +0000 (+0200) Subject: migrate: workaround issues with format switch on storage live migration X-Git-Url: https://git.proxmox.com/?p=qemu-server.git;a=commitdiff_plain;h=38311a1d17e371902fa06e2d7cc2a1d6d00b10cd migrate: workaround issues with format switch on storage live migration Signed-off-by: Thomas Lamprecht --- diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 0a6277d..97fd994 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -1143,7 +1143,17 @@ sub phase3_cleanup { } if ($self->{volume_map}) { + my $target_drives = $self->{target_drive}; + + # FIXME: for NBD storage migration we now only update the volid, and + # not the full drivestr from the target node. Workaround that until we + # got some real rescan, to avoid things like wrong format in the drive + delete $conf->{$_} for keys %$target_drives; PVE::QemuConfig->update_volume_ids($conf, $self->{volume_map}); + + for my $drive (keys %$target_drives) { + $conf->{$drive} = $target_drives->{$drive}->{drivestr}; + } PVE::QemuConfig->write_config($vmid, $conf); }