5
0
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:
Fabian Grünbichler 2016-09-15 13:24:35 +02:00 committed by Dietmar Maurer
parent 3a7bc9e252
commit 6b72854b95

View File

@ -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;
}
}
});