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():...@@ -1024,7 +1024,7 @@ def main():
1024 if virsh("domstate", name).strip() != "shut off":1024 if virsh("domstate", name).strip() != "shut off":
1025 virsh("destroy", name)1025 virsh("destroy", name)
1026 root = transition.normalize_vm(ET.fromstring(virsh("dumpxml", name)))1026 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 []))
1028 directory = DISKS / name1028 directory = DISKS / name
1029 if payload["disks"] and directory.is_dir():1029 if payload["disks"] and directory.is_dir():
1030 for file in directory.iterdir():1030 for file in directory.iterdir():