]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/QemuMigrate.pm
migrate: workaround issues with format switch on storage live migration
[qemu-server.git] / PVE / QemuMigrate.pm
index 0a6277db6a4226330682ed24d6b352de71fbd270..97fd9940e2b2dcf0411796d3d49042ef07be9718 100644 (file)
@@ -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);
     }