Repository navigation
README: say how Save state works on WHPX and on TCG - #152
Conversation
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
left a comment
There was a problem hiding this comment.
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.
| **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. |
There was a problem hiding this comment.
"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.
|
Both taken:
|
A21-devs
left a comment
There was a problem hiding this comment.
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".
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.
savevmcan't work under WHPX (migration reports "State blocked due to missing dirty memory tracking support"), what the app does instead (guest-suspend-disktoqemu-guest-agent, the guest writes its memory into its own swap), and that a TCG save state is a plainsavevminto the qcow2 that is loaded and then deleted, so it is used once.powercfg /hibernate on) with the caveat that the setup command doesn't cover Windows and that path isn't tested end to end.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) andsrc/main/agent.ts(guest-suspend-disk) to make sure every claim matches what the code does, and againstguestSetupfor what the setup command installs.npm testandnpm run typecheckstill run clean.