From 87cd101eb3c55d0ad7e8f2142fcce90865da7d39 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 13 Sep 2026 11:22:40 +0200 Subject: feat(vm-manager): offer to discard a saved state that will not restore A VM saved rather than shut down restores its memory image on the next start. When that image cannot be restored the start fails every time with "unable to execute QEMU command 'migrate-incoming'", and the panel showed an ordinary "shut off" with a Start button that could never work. Detection is virsh dominfo grepped for "Managed save: yes", polled per VM on every list refresh the way the agent rows are. domstats does not report it: the shut-off reason reads "failed", from the failed start, not from the save. virsh list --all --managed-save does print "saved" in the state column, but not together with --name, which is the form the panel lists with. The button appears only when a saved image exists, since managedsave-remove fails without one and would be noise on every other VM. It takes a confirmation click but not a typed name: it deletes the memory image and leaves the disk alone, so the cost of a misclick is a cold boot. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Lo1FG4qTr1inavmhqhfobe --- vm-manager/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'vm-manager/README.md') diff --git a/vm-manager/README.md b/vm-manager/README.md index 8d817f9..bcf12ac 100644 --- a/vm-manager/README.md +++ b/vm-manager/README.md @@ -85,6 +85,18 @@ in a delete confirmation gives it up. ## Destructive actions +`Discard saved state` appears on a shut-off VM only when one actually exists, +and runs `virsh managedsave-remove`. A VM that was saved rather than shut down +restores that memory image on the next `start`, and when the image cannot be +restored the start fails every time with a QEMU `migrate-incoming` error while +the panel shows an ordinary `shut off`. Discarding it deletes the memory image +and nothing else, so the next start is a cold boot and the disk is untouched. +That is why it takes a confirmation but not a typed name. + +Detection is `virsh dominfo`, grepped for `Managed save: yes`, once per VM on +every list refresh. `domstats` does not carry it and `virsh list --name` drops +the column that would. + `Reset`, `Force stop`, snapshot `Revert` and snapshot `Delete` each take one confirmation click. `Delete VM` requires the machine's name to be typed, because it runs `virsh undefine --remove-all-storage`, which erases the disk -- cgit v1.2.3