[pve-devel] [PATCH qemu-server v2 3/3] fix #3903: api2: remove vmid from jobs.cfg

Hannes Laimer h.laimer at proxmox.com
Thu Mar 3 17:05:24 CET 2022


... on destroy if 'purge' is selected

Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
 PVE/API2/Qemu.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 9be1caf..465abc2 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -31,6 +31,7 @@ use PVE::AccessControl;
 use PVE::INotify;
 use PVE::Network;
 use PVE::Firewall;
+use PVE::Jobs;
 use PVE::API2::Firewall::VM;
 use PVE::API2::Qemu::Agent;
 use PVE::VZDump::Plugin;
@@ -1696,6 +1697,7 @@ __PACKAGE__->register_method({
 		    print "purging VM $vmid from related configurations..\n";
 		    PVE::ReplicationConfig::remove_vmid_jobs($vmid);
 		    PVE::VZDump::Plugin::remove_vmid_from_backup_jobs($vmid);
+		    PVE::Jobs::remove_vmid_from_jobs($vmid);
 
 		    if ($ha_managed) {
 			PVE::HA::Config::delete_service_from_config("vm:$vmid");
-- 
2.30.2






More information about the pve-devel mailing list