Check array existed before use.

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.
This commit is contained in:
Wolfgang Link 2017-02-23 14:44:54 +01:00 committed by Fabian Grünbichler
parent 655d746212
commit 9045f57a27

View File

@ -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");