[pve-devel] applied: [PATCH qemu-server] migrate: fix local disk migration with online VMs

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jan 17 10:59:40 CET 2019


commit 4530494bf9f3d45c4a405c53ef3688e641f6bd8e introduced an
regression with local disk migrations if the VM is online and thus
needs to live migrated and no target storage was passed as parameter.

We made the hack to write "1" to the targetstorage option in this
case obsolete, but it was still used on deciding if there are any
drives to mirror at all. Here it is enough to check if there are any
'online_local_volumes' because that hash gets only filled if we can
and are told to live mirror local disk on migrations anyway. Also,
we abort early if local disks are found and the 'with-local-disks'
option is not set.

This was reported at:
https://forum.proxmox.com/threads/livemigration-with-localdisk-doesnt-coppy-and-data-from-the-hdds-anymore.50744/

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 PVE/QemuMigrate.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index d142d29..07d57ed 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -641,7 +641,7 @@ sub phase2 {
 
     my $start = time();
 
-    if ($self->{opts}->{targetstorage} && defined($self->{online_local_volumes})) {
+    if (defined($self->{online_local_volumes})) {
 	$self->{storage_migration} = 1;
 	$self->{storage_migration_jobs} = {};
 	$self->log('info', "starting storage migration");
-- 
2.20.1





More information about the pve-devel mailing list