fixup: delete cloudinit disk before restoring master
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 17 May 2019 10:09:51 +0000 (12:09 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 17 May 2019 10:09:56 +0000 (12:09 +0200)
cloudinit is just completely broken...
Until we rewrite this to a sane designe (i.e., never backup, mirror,
... any CI disk anywhere - the state is in the config and gets
created on start and deleted on stop anyway) do this..

Co-developed-by: Mira Limbek <m.limbek@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer.pm

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