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 64-bit Windows PowerShell running as `SYSTEM`. 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## Development image
29
30`windows-11-pro-development-v1` adds the C++ build tools and Windows SDK, Rust,
31Node/pnpm, Python and Git. Its installed versions, installer hashes and recipe
32hash are recorded in `C:\Snowglobe\development.json`. `computer_presets` exposes
33the image's recommended resources; its memory and disk values are bytes.
34
35Run [windows-development.ps1](../guest/windows-development.ps1) from the elevated
36desktop account before template preparation. The toolchains use machine-wide
37paths and were verified with ordinary desktop privileges and fresh account names.
38The development image is a separate family; clean Windows images keep their IDs.
39
40## 2026-10-20 rollout
41
42The `windows-10-pro-v10` candidate was prepared and tested on HDD storage with
43four vCPUs, 4 GiB RAM, and a 64 GiB disk. Both its base and each clone's writable
44overlay stayed on HDD. The host's 150 GiB SSD read cache remained enabled.
45
46Preparation refreshed the 64-bit .NET Framework native-image cache with
47`ngen update /force` and installed native images for the assemblies loaded by
48Windows PowerShell, then reran the normal `-Prepare` flow. All assembly-install
49commands and preparation completed successfully. See Microsoft's
50[Ngen documentation](https://learn.microsoft.com/en-us/dotnet/framework/tools/ngen-exe-native-image-generator)
51for regeneration after framework servicing. No global CLR switches were added.
52
53| Candidate | Fresh clone to ready | Account |
54| --- | ---: | --- |
55| v9 repeat | 455 s | fixture |
56| v10 first | 206 s | fixture |
57| v10 repeat | 161 s | fixture2 |
58
59Both v10 clones completed personalization and reboot, started Explorer and the
60guest capture process, and received distinct computer names. These are rollout
61observations with differing cache warmth, not a controlled measurement of
62L2ARC's contribution. Synchronous writes still reach HDDs.
63
64The published v10 preset supersedes v4. v4 and earlier referenced bases remain
65available to their existing guests. Reverting the default requires withdrawing
66v10 from discovery while preserving its bytes wherever clones still reference
67them; it does not require modifying existing guest disks.
68
69## First-run timing after fleet retirement
70
71After [retiring the unused guests](vm-retirement.md), another disposable v10
72clone reached `ready` in 95.75 seconds with the same 4-vCPU/4-GiB configuration.
73The host observed these phases by polling the provisioning markers:
74
75| Phase | Duration |
76| --- | ---: |
77| Create disk clone and start | 1.12 s |
78| First boot through provisioning startup | 48.63 s |
79| Apply account and computer identity | 2.08 s |
80| Restart, log in, and start desktop capture | 43.92 s |
81
82The guest agent first answered at 33.10 seconds. Guest marker timestamps put
83identity changes at 1.83 seconds; the host's polling rounds this to 2.08 seconds.
84Two Kernel-General boot events confirmed the reboot. Explorer and guest capture
85were running, and the production browser displayed the personalized desktop.
86
87The v10 trace used a disk template with `Rename-Computer` and a restart before
88desktop capture. Cloning the disk itself was already inexpensive.
89
90By `ready`, QEMU recorded 474 flushes with 46.45 seconds of aggregate duration
91(98 ms per flush), 2.24 GB read, and 105 MB written. These operation durations
92can overlap and are not an additive wall-clock breakdown. The read cache does
93not accelerate synchronous HDD writes. This quieter-host result also has
94different cache warmth, so it does not isolate the benefit of fleet retirement.
95
96The restricted raw trace is
97`/var/lib/snowglobe/retirements/vms-20261020/windows-boot-trace.json`.
98The trace guest was shut down and removed afterward; the published preset and
99personal Mac remained intact.
100
101## One-boot rollout
102
103`windows-10-pro-v11` supersedes v10 and uses `windows-v4`: the computer name stays
104unchanged, while the selected username and a fresh password are applied to the
105existing account SID/profile. A targeted sign-out/sign-in refreshes the desktop
106environment. The SID-bound capture task starts in the new interactive session.
107Temporary `ForceAutoLogon` is removed on both success and failure.
108
109With four vCPUs, 4 GiB RAM and a 64 GiB HDD overlay, the candidate reached ready
110in 60.10 seconds; a fresh clone of the published v11 reached ready in 59.88
111seconds. That is about 36 seconds faster than the quiet-host v10 trace above.
112Both machines kept the template computer name and had one Kernel-General boot
113event since creation. Interactive username, SID/profile, password authentication,
114Explorer and capture session ownership, and removal of `ForceAutoLogon` were
115checked. These are individual runs with differing cache warmth.