mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-02 21:14:59 +00:00
destroy vm: clean up potential left-over fleecing images
Avoids that any left-over fleecing images become orphaned. Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Link: https://lore.proxmox.com/20250127112923.31703-17-f.ebner@proxmox.com
This commit is contained in:
parent
4e659fcac6
commit
a5185ba114
@ -2122,6 +2122,9 @@ sub check_type {
|
||||
sub destroy_vm {
|
||||
my ($storecfg, $vmid, $skiplock, $replacement_conf, $purge_unreferenced) = @_;
|
||||
|
||||
eval { PVE::QemuConfig::cleanup_fleecing_images($vmid, $storecfg) };
|
||||
log_warn("attempt to clean up left-over fleecing images failed - $@") if $@;
|
||||
|
||||
my $conf = PVE::QemuConfig->load_config($vmid);
|
||||
|
||||
if (!$skiplock && !PVE::QemuConfig->has_lock($conf, 'suspended')) {
|
||||
|
Loading…
Reference in New Issue
Block a user