mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-22 22:03:55 +03:00
restore: better error handling for vdisk deletion
when restoring into an existing VM, we don't want to die half-way through because we can't delete one of the existing volumes. instead, warn about the deletion failure, but continue anyway. the not deleted disk is then added as unused automatically.
This commit is contained in:
parent
3a7bc9e252
commit
6b72854b95
@ -5343,7 +5343,10 @@ sub restore_vma_archive {
|
||||
# Note: only delete disk we want to restore
|
||||
# other volumes will become unused
|
||||
if ($virtdev_hash->{$ds}) {
|
||||
PVE::Storage::vdisk_free($cfg, $volid);
|
||||
eval { PVE::Storage::vdisk_free($cfg, $volid); };
|
||||
if (my $err = $@) {
|
||||
warn $err;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user