fix #2382: delete cloudinit disk before restoring

The fix introduced in commit bf4a933 did not work as intended. We're
iterating over the $oldconf, not over $virtdev_hash. This means
$drive->{is_cloudinit} is always undefined. Instead use the $exclude_cloudinit
parameter from drive_is_cdrom().

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
This commit is contained in:
Mira Limbeck 2019-09-25 15:30:12 +02:00 committed by Thomas Lamprecht
parent 2135fcdb36
commit a82348eb34

View File

@ -6509,7 +6509,7 @@ sub restore_vma_archive {
foreach_drive($oldconf, sub {
my ($ds, $drive) = @_;
return if !$drive->{is_cloudinit} && drive_is_cdrom($drive);
return if drive_is_cdrom($drive, 1);
my $volid = $drive->{file};
return if !$volid || $volid =~ m|^/|;