migrate: workaround issues with format switch on storage live migration

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-04-17 15:27:38 +02:00
parent b01de19922
commit 38311a1d17

View File

@ -1143,7 +1143,17 @@ sub phase3_cleanup {
} }
if ($self->{volume_map}) { 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}); 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); PVE::QemuConfig->write_config($vmid, $conf);
} }