mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-14 00:38:08 +00:00
followup: use new base config provided destroy_config method
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
3e8e214d73
commit
5172770df7
@ -1498,8 +1498,9 @@ __PACKAGE__->register_method({
|
||||
PVE::QemuServer::destroy_vm($storecfg, $vmid, 1, $skiplock);
|
||||
PVE::AccessControl::remove_vm_access($vmid);
|
||||
PVE::Firewall::remove_vmfw_conf($vmid);
|
||||
unlink PVE::QemuConfig->config_file($vmid)
|
||||
or die "Removal of VM $vmid config file failed: $!\n";
|
||||
|
||||
# only now remove the zombie config, else we can have reuse race
|
||||
PVE::QemuConfig->destroy_config($vmid);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -2665,7 +2665,7 @@ sub destroy_vm {
|
||||
if ($keep_empty_config) {
|
||||
PVE::Tools::file_set_contents($conffile, "memory: 128\n");
|
||||
} else {
|
||||
unlink $conffile;
|
||||
PVE::QemuConfig->destroy_config($vmid);
|
||||
}
|
||||
|
||||
# also remove unused disk
|
||||
|
Loading…
Reference in New Issue
Block a user