[pve-devel] [PATCH v4 qemu-server 8/9] migration: attempt to clean up potential left-over fleecing images
Fiona Ebner
f.ebner at proxmox.com
Mon Nov 11 14:54:35 CET 2024
Clean up left-over fleecing images 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>
---
Changes in v4:
* order before loading the configuration for migration
PVE/QemuMigrate.pm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 6591f3f7..32eeade2 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -177,6 +177,13 @@ sub prepare {
my $storecfg = $self->{storecfg} = PVE::Storage::config();
+ # updates the configuration, so ordered before saving the configuration in $self
+ eval {
+ PVE::QemuConfig::cleanup_fleecing_images(
+ $vmid, $storecfg, sub { $self->log($_[0], $_[1]); });
+ };
+ $self->log('warn', "attempt to clean up left-over fleecing images failed - $@") if $@;
+
# test if VM exists
my $conf = $self->{vmconf} = PVE::QemuConfig->load_config($vmid);
--
2.39.5
More information about the pve-devel
mailing list