From 38311a1d17e371902fa06e2d7cc2a1d6d00b10cd Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 17 Apr 2020 15:27:38 +0200 Subject: [PATCH] migrate: workaround issues with format switch on storage live migration Signed-off-by: Thomas Lamprecht --- PVE/QemuMigrate.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 0a6277db..97fd9940 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); }