From 89099a07c74b8475c043ca8bf055b6c84869f072 Mon Sep 17 00:00:00 2001 From: Mira Limbeck Date: Wed, 25 Sep 2019 15:30:12 +0200 Subject: [PATCH] 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 (cherry picked from commit a82348eb343b64496035f7ed74cecfc364a046fb) Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index abef4e74..fab6b290 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -6301,7 +6301,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|^/|;