]> git.proxmox.com Git - qemu-server.git/commitdiff
fix #2382: delete cloudinit disk before restoring
authorMira Limbeck <m.limbeck@proxmox.com>
Wed, 25 Sep 2019 13:30:12 +0000 (15:30 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 25 Sep 2019 14:53:29 +0000 (16:53 +0200)
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>
PVE/QemuServer.pm

index ad6902f3c6e129824436fe7fc483a383b361a5f5..00c6b58b70597cbdd49f19b09d2f4c0a9735c802 100644 (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|^/|;