From 62f43140a5416bc7200a2df5f7b4a33f26400c29 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Tue, 20 Oct 2026 14:56:55 -0700 Subject: [PATCH] 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 --- tools/vms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/vms.py b/tools/vms.py index 64b0c0d01e3c4cab9e0151aa8da60bbe074692f2..b9e83a067faab71863358c244e35fd6df09995a4 100644 --- a/tools/vms.py +++ b/tools/vms.py @@ -1024,7 +1024,7 @@ def main(): if virsh("domstate", name).strip() != "shut off": virsh("destroy", name) root = transition.normalize_vm(ET.fromstring(virsh("dumpxml", name))) - virsh("undefine", name, *(["--nvram"] if root.find("./os/nvram") is not None else []), *(["--tpm"] if root.find("./devices/tpm") is not None else [])) + 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 [])) directory = DISKS / name if payload["disks"] and directory.is_dir(): for file in directory.iterdir(): -- 2.54.1