mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-02 13:14:11 +00:00
migration: attempt to clean up potential left-over fleecing images
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@proxmox.com> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Link: https://lore.proxmox.com/20250127112923.31703-16-f.ebner@proxmox.com
This commit is contained in:
parent
a39866732f
commit
4e659fcac6
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user