[pve-devel] [PATCH qemu-server 1/1] fix #6613: pass purge param to delete_service_from_config
Michael Köppl
m.koeppl at proxmox.com
Wed Sep 17 13:53:12 CEST 2025
This covers the case where users want to delete a VM that is also a HA
resource. If the purge param is set, the HA resource will also be
removed from the affinity rules referencing the resource. If the
affected rule only contains this one resource, the rule is also deleted.
Signed-off-by: Michael Köppl <m.koeppl at proxmox.com>
---
src/PVE/API2/Qemu.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index 34f615d8..46a6a06d 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -2760,7 +2760,9 @@ __PACKAGE__->register_method({
PVE::VZDump::Plugin::remove_vmid_from_backup_jobs($vmid);
if ($ha_managed) {
- PVE::HA::Config::delete_service_from_config("vm:$vmid");
+ PVE::HA::Config::delete_service_from_config(
+ "vm:$vmid", $param->{purge},
+ );
print "NOTE: removed VM $vmid from HA resource configuration.\n";
}
}
--
2.47.3
More information about the pve-devel
mailing list