Skip to content

README: say how Save state works on WHPX and on TCG - #152

Merged
A21-devs merged 2 commits into
mainfrom
docs/save-state
Dec 4, 2026
Merged

A21-devs merged 2 commits into
mainfrom
docs/save-state

Conversation

@A21-devs

@A21-devs A21-devs commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Closes #31

The README had one line about Save state in the feature list and nothing about how it works, while the FAQ only covered the profile side of the same mechanism.

  • The feature bullet now names both paths and links the wiki page.
  • A new FAQ entry says why savevm can't work under WHPX (migration reports "State blocked due to missing dirty memory tracking support"), what the app does instead (guest-suspend-disk to qemu-guest-agent, the guest writes its memory into its own swap), and that a TCG save state is a plain savevm into the qcow2 that is loaded and then deleted, so it is used once.
  • The guests entry now also covers Save state, says what the one-time setup command actually does, and names the two things a Windows guest needs (guest agent from virtio-win, powercfg /hibernate on) with the caveat that the setup command doesn't cover Windows and that path isn't tested end to end.
  • Removed a stale claim while I was in there: the FAQ said profiles of a powered-off VM aren't supported, which stopped being true with Disk snapshots for powered-off VMs #17.

Wiki: Save state and profiles now has a section per acceleration with the same facts in more detail (pushed, A21-devs/Virtual-Machine-Manager.wiki@07dbcbe).

Testing

Docs only, no code touched. Read both pages back against src/main/ipc.ts (saveState, startVm), src/main/vmRunner.ts (saveAndQuit, QUICKSAVE) and src/main/agent.ts (guest-suspend-disk) to make sure every claim matches what the code does, and against guestSetup for what the setup command installs. npm test and npm run typecheck still run clean.

@A21-devs A21-devs added the documentation Improvements or additions to documentation label Dec 4, 2026
The feature list had one line about it and the FAQ only explained the
profile side. The FAQ now says why WHPX can't savevm, what the guest
agent does instead, that a TCG save state is a savevm used once, and
what a Windows guest needs.

Also drops the FAQ's claim that profiles of a powered-off VM aren't
supported: they have been since #17.

@A21-devs A21-devs left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked every claim against the code rather than the prose: the WHPX branch of saveState really does send guest-suspend-disk and markExpectedExit, the TCG branch is saveAndQuit writing vmm-quicksave with savevm, and startVm loads it with -loadvm and then deleteSnapshotLive, so "used exactly once" is right. Dropping the powered-off claim is right too, that has worked since #17. Two wording things.

One of them is on the wiki page this links to rather than in the diff: "Nothing is stored on your PC for this, the saved session lives in the guest's swap". The guest's swap sits inside the guest's virtual disk, which is a file on the PC, so as written it says something false. What it means is that the app doesn't add a snapshot of its own to the qcow2 the way the TCG path does, and it should say that instead.

Comment thread README.md Outdated
**How does Save state work?** It depends on the acceleration, because QEMU's WHPX backend refuses to write a running guest's memory to disk: `savevm` is built on migration, and migration reports "State blocked due to missing dirty memory tracking support".

**Which guests can keep open apps in a profile?** Linux guests based on Debian or Ubuntu (Kali, Ubuntu, Mint, Parrot) after a one-time setup command that the app shows you the first time. Windows guests aren't supported yet ([#42](https://github.com/A21-devs/Virtual-Machine-Manager/issues/42)), and neither are profiles of a powered-off VM ([#17](https://github.com/A21-devs/Virtual-Machine-Manager/issues/17)).
- **With WHPX** (the normal case on Windows) the app asks the guest to hibernate itself through `qemu-guest-agent`. The guest writes its own memory into its own swap and powers off, and the next **Power on** is a normal boot that the guest resumes from. It needs the one-time guest setup below.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the normal case on Windows" reads oddly next to the feature list, which says WHPX is used "when Windows Hypervisor Platform is on, and plain emulation (TCG) when it isn't" - so it is the default only once that Windows feature is turned on, which is exactly what the Installing page walks people through. "when WHPX is on" would match, and the Summary tab names the acceleration per VM anyway.

Also "the one-time guest setup below" leans on this entry staying directly above the guests entry. A link to the wiki page would survive the next edit to this section.

@A21-devs

A21-devs commented Dec 4, 2026

Copy link
Copy Markdown
Owner Author

Both taken:

  • the WHPX bullet says "whenever Windows Hypervisor Platform is on", matching the feature list, and points at the Guest setup page by link rather than "below".
  • the wiki line is fixed too (A21-devs/Virtual-Machine-Manager.wiki@77d1894): it now says the app adds nothing to the qcow2 the way the TCG path does, and that the saved session sits in the guest's own swap inside its disk. Thanks, that sentence as written was simply wrong.

@A21-devs A21-devs left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second pass over the last commit and the wiki commit it mentions. Both are fixed: the WHPX bullet is conditioned on Windows Hypervisor Platform being on, which is how the feature list already puts it, and the setup pointer is a link that survives this section being reordered. The wiki sentence now says the app adds nothing to the qcow2 the way the TCG path does and that the session sits in the guest's own swap inside its disk, which is both true and still makes the original point.

Read the FAQ once more end to end afterwards: the guests entry and the powered-off entry don't contradict each other or the profiles entry above them, and the only issue number left in the section is #42, which is open. Nothing else outstanding.

"The normal case on Windows" disagreed with the feature list, which
says WHPX is used when Windows Hypervisor Platform is on. The pointer to
the guest setup is a link now instead of "below".
@A21-devs
A21-devs merged commit 29aec52 into main Dec 4, 2026
1 check passed
@A21-devs
A21-devs deleted the docs/save-state branch December 4, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Save state: how it works on WHPX vs TCG and the guest setup

1 participant