[pve-devel] [PATCH qemu-server 1/8] migrate: improve cleanup_remotedisks
Fabian Grünbichler
f.gruenbichler at proxmox.com
Mon Mar 30 13:41:29 CEST 2020
to also handle cases where disk allocation failed in the remote
vm_start, and we only have a bitmap but no target drive information.
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
PVE/QemuMigrate.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 80978b9..579be0e 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -550,7 +550,10 @@ sub cleanup_remotedisks {
my ($self) = @_;
foreach my $target_drive (keys %{$self->{target_drive}}) {
- my $drive = PVE::QemuServer::parse_drive($target_drive, $self->{target_drive}->{$target_drive}->{drivestr});
+ my $drivestr = $self->{target_drive}->{$target_drive}->{drivestr};
+ next if !defined($drivestr);
+
+ my $drive = PVE::QemuServer::parse_drive($target_drive, $drivestr);
# don't clean up replicated disks!
next if defined($self->{replicated_volumes}->{$drive->{file}});
--
2.20.1
More information about the pve-devel
mailing list