mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-05 10:19:24 +00:00
destroy_vm: allow vdisk_free to fail
otherwise we end up with undeletable VM configs in case vdisk_free fails (which could happen because of cluster-wide lock contention, storage problems, ..). Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
0db93c2d8a
commit
31b522478d
@ -2082,7 +2082,11 @@ sub destroy_vm {
|
||||
my ($path, $owner) = PVE::Storage::path($storecfg, $volid);
|
||||
return if !$path || !$owner || ($owner != $vmid);
|
||||
|
||||
PVE::Storage::vdisk_free($storecfg, $volid);
|
||||
eval {
|
||||
PVE::Storage::vdisk_free($storecfg, $volid);
|
||||
};
|
||||
warn "Could not remove disk '$volid', check manually: $@" if $@;
|
||||
|
||||
});
|
||||
|
||||
if ($keep_empty_config) {
|
||||
|
Loading…
Reference in New Issue
Block a user