mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-10-06 08:20:23 +00:00
fix #2382: delete cloudinit disk before restoring
The fix introduced in commitbf4a933
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> (cherry picked from commita82348eb34
) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
c5fdfea839
commit
89099a07c7
@ -6301,7 +6301,7 @@ sub restore_vma_archive {
|
|||||||
foreach_drive($oldconf, sub {
|
foreach_drive($oldconf, sub {
|
||||||
my ($ds, $drive) = @_;
|
my ($ds, $drive) = @_;
|
||||||
|
|
||||||
return if !$drive->{is_cloudinit} && drive_is_cdrom($drive);
|
return if drive_is_cdrom($drive, 1);
|
||||||
|
|
||||||
my $volid = $drive->{file};
|
my $volid = $drive->{file};
|
||||||
return if !$volid || $volid =~ m|^/|;
|
return if !$volid || $volid =~ m|^/|;
|
||||||
|
Loading…
Reference in New Issue
Block a user