[pve-devel] [RFC qemu-server v3 20/22] migration: attempt to clean up potential left-over fleecing images

Fiona Ebner f.ebner at proxmox.com
Thu Apr 11 11:29:41 CEST 2024


Before the guest is migrated to a different node and they'd really
become orphaned.

Suggested-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 PVE/QemuMigrate.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 8d9b35ae..a190ce03 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -179,6 +179,9 @@ sub prepare {
     my $version = PVE::QemuServer::Helpers::get_node_pvecfg_version($self->{node});
     my $cloudinit_config = $conf->{cloudinit};
 
+    eval { PVE::QemuConfig::cleanup_fleecing_images($vmid, $storecfg) };
+    $self->log('warn', "attempt to clean up left-over fleecing images failed - $@") if $@;
+
     if (
 	PVE::QemuConfig->has_cloudinit($conf) && defined($cloudinit_config)
 	&& scalar(keys %$cloudinit_config) > 0
-- 
2.39.2





More information about the pve-devel mailing list