1# Windows presets
2
3Prepared images live in the VM library's `Presets` directory. Each published
4directory is immutable: existing guests retain QCOW2 backing-file references
5to it. Publish a new ID with `supersedes` to change the library default while
6preserving older bases. Host paths come from the configured VM library root.
7
8The provisioning contract is [windows-provision.ps1](../guest/windows-provision.ps1).
9Prepare an isolated template with its account named `sandbox`, then run that
10script with `-Prepare` from elevated 64-bit Windows PowerShell. Preparation
11randomizes the template password, removes clone identity and completion state,
12and installs the startup task. Shut down normally before capturing through
13`vms.save_preset` with `setup=windows-v4`. The dashboard deliberately rejects
14ordinary Windows preset capture because it cannot establish preparation.
15
16Validate fresh clones with different account names before publication. Check
17the personalized account, unchanged computer name, one boot, the `ready` marker, Explorer,
18the guest capture process, and the actual dashboard screen and input. Compare
19the published disk and NVRAM bytes with the tested candidate, and check that
20the disk is standalone with `qemu-img info` and `qemu-img check`. Never replace
21an existing base in place.
22
23New clones retain the template computer name. Account personalization uses one
24sign-out/sign-in so the desktop inherits the selected username, without a second
25OS boot. Each clone still gets a separate password, MAC address, and DHCP lease.
26Published `windows-v3` bases keep their original rename-and-reboot seed contract.
27
28## 2026-10-20 rollout
29
30The `windows-10-pro-v10` candidate was prepared and tested on HDD storage with
31four vCPUs, 4 GiB RAM, and a 64 GiB disk. Both its base and each clone's writable
32overlay stayed on HDD. The host's 150 GiB SSD read cache remained enabled.
33
34Preparation refreshed the 64-bit .NET Framework native-image cache with
35`ngen update /force` and installed native images for the assemblies loaded by
36Windows PowerShell, then reran the normal `-Prepare` flow. All assembly-install
37commands and preparation completed successfully. See Microsoft's
38[Ngen documentation](https://learn.microsoft.com/en-us/dotnet/framework/tools/ngen-exe-native-image-generator)
39for regeneration after framework servicing. No global CLR switches were added.
40
41| Candidate | Fresh clone to ready | Account |
42| --- | ---: | --- |
43| v9 repeat | 455 s | fixture |
44| v10 first | 206 s | fixture |
45| v10 repeat | 161 s | fixture2 |
46
47Both v10 clones completed personalization and reboot, started Explorer and the
48guest capture process, and received distinct computer names. These are rollout
49observations with differing cache warmth, not a controlled measurement of
50L2ARC's contribution. Synchronous writes still reach HDDs.
51
52The published v10 preset supersedes v4. v4 and earlier referenced bases remain
53available to their existing guests. Reverting the default requires withdrawing
54v10 from discovery while preserving its bytes wherever clones still reference
55them; it does not require modifying existing guest disks.
56
57## First-run timing after fleet retirement
58
59After [retiring the unused guests](vm-retirement.md), another disposable v10
60clone reached `ready` in 95.75 seconds with the same 4-vCPU/4-GiB configuration.
61The host observed these phases by polling the provisioning markers:
62
63| Phase | Duration |
64| --- | ---: |
65| Create disk clone and start | 1.12 s |
66| First boot through provisioning startup | 48.63 s |
67| Apply account and computer identity | 2.08 s |
68| Restart, log in, and start desktop capture | 43.92 s |
69
70The guest agent first answered at 33.10 seconds. Guest marker timestamps put
71identity changes at 1.83 seconds; the host's polling rounds this to 2.08 seconds.
72Two Kernel-General boot events confirmed the reboot. Explorer and guest capture
73were running, and the production browser displayed the personalized desktop.
74
75This is a disk template, not a saved-memory resume. `Rename-Computer` in the
76provisioning script is followed by a forced restart; the second boot enables
77capture and waits for the desktop. Avoiding that second boot is the next
78architectural opportunity. Cloning the disk itself is already inexpensive.
79
80By `ready`, QEMU recorded 474 flushes with 46.45 seconds of aggregate duration
81(98 ms per flush), 2.24 GB read, and 105 MB written. These operation durations
82can overlap and are not an additive wall-clock breakdown. The read cache does
83not accelerate synchronous HDD writes. This quieter-host result also has
84different cache warmth, so it does not isolate the benefit of fleet retirement.
85
86The restricted raw trace is
87`/var/lib/snowglobe/retirements/vms-20261020/windows-boot-trace.json`.
88The trace guest was shut down and removed afterward; the published preset and
89personal Mac remained intact.
90
91## One-boot rollout
92
93`windows-10-pro-v11` supersedes v10 and uses `windows-v4`: the computer name stays
94unchanged, while the selected username and a fresh password are applied to the
95existing account SID/profile. A targeted sign-out/sign-in refreshes the desktop
96environment. The SID-bound capture task starts in the new interactive session.
97Temporary `ForceAutoLogon` is removed on both success and failure.
98
99With four vCPUs, 4 GiB RAM and a 64 GiB HDD overlay, the candidate reached ready
100in 60.10 seconds; a fresh clone of the published v11 reached ready in 59.88
101seconds. That is about 36 seconds faster than the quiet-host v10 trace above.
102Both machines kept the template computer name and had one Kernel-General boot
103event since creation. Interactive username, SID/profile, password authentication,
104Explorer and capture session ownership, and removal of `ForceAutoLogon` were
105checked. These are individual runs with differing cache warmth.