[pve-devel] [PATCH qemu-sever] Check array existed before use.

Wolfgang Link w.link at proxmox.com
Thu Feb 23 14:44:54 CET 2017


This triggers if a qemu guest has a local unused disk.
The disk will migrate by offline disk migration, so it is not in the target_drives.
---
 PVE/QemuMigrate.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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





More information about the pve-devel mailing list