authoravatarclover caruso<git@paperclover.net>2026-10-20 14:56:55-07:00
committeravatarclover caruso<git@paperclover.net>2026-10-21 02:52:29-07:00
log62f43140a5416bc7200a2df5f7b4a33f26400c29
tree71c71bd7392b961637e7d573c28c7e9e9aa279a7
parentc3e3a11fe4bec98ff89d6b77bfaac24c1f7cf87d
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU

Delete managed-save state with a VM

Libvirt rejected deletion of a stopped Windows test guest because its saved RAM state still existed. Include managed-save state in the existing explicit VM deletion operation. Assisted-by: gpt-6-astra

1 files changed, 1 insertions(+), 1 deletions(-)

tools/vms.py+1-1
......@@ -1024,7 +1024,7 @@ def main():
10241024 if virsh("domstate", name).strip() != "shut off":
10251025 virsh("destroy", name)
10261026 root = transition.normalize_vm(ET.fromstring(virsh("dumpxml", name)))
1027 virsh("undefine", name, *(["--nvram"] if root.find("./os/nvram") is not None else []), *(["--tpm"] if root.find("./devices/tpm") is not None else []))
1027 virsh("undefine", name, "--managed-save", *(["--nvram"] if root.find("./os/nvram") is not None else []), *(["--tpm"] if root.find("./devices/tpm") is not None else []))
10281028 directory = DISKS / name
10291029 if payload["disks"] and directory.is_dir():
10301030 for file in directory.iterdir():