Windows Golden Image Recipe
Booting a fresh Windows DevBox is slow: ClusterCode runs Windows as a full VM, and the unattended Windows install takes 20–30 minutes on first boot. Then you still have to install your toolchain — Node, Git, an editor, your AI CLIs — every single time.
This recipe fixes both in two levels: prepare a Windows DevBox by hand once, then snapshot it into a golden image so every future launch reaches a working desktop — with all your tools already installed — in seconds.
The two levels
Section titled “The two levels”- Level 1 — Prepare the machine. Launch a Windows DevBox, open its terminal, and install everything you want baked in. You do this once.
- Level 2 — Bake the image. Snapshot that prepared DevBox into a reusable golden image. Every launch from it skips the Windows install and the tool install.
The payoff compounds: the slow parts (Windows first-boot, Chocolatey, npm globals) happen a single time, and are then frozen into the image.
Level 1 — Prepare a Windows DevBox
Section titled “Level 1 — Prepare a Windows DevBox”-
Launch a Windows DevBox. From Launch, pick a worker that supports Windows VMs, choose a Windows image (e.g. Windows Server 2022/2025), and start it. Wait for the first-boot install to finish — this is the slow, one-time part.
-
Open the DevBox terminal. Once the desktop is up, open the DevBox terminal right from the ClusterCode console (the DevBoxes list). It opens a PowerShell session inside the guest, in your browser — you’ll land at a prompt as the
developeruser, no RDP or VNC needed.
The proven setup — one paste
Section titled “The proven setup — one paste”Paste this entire block into the DevBox terminal in the ClusterCode console. It’s the exact, tested sequence we use to prepare a Windows golden image — Chocolatey, the base tools (Node.js, Git, VS Code, GitHub CLI), and the three AI coding agents (Claude Code, OpenAI Codex, and GitHub Copilot), including the PATH wiring that makes claude resolve. Paste it once and it sets up the whole machine.
# 1. Bootstrap Chocolatey (the package manager for the base tools)Set-ExecutionPolicy Bypass -Scope Process -Force[System.Net.ServicePointManager]::SecurityProtocol = 3072iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# 2. Install Node.js (LTS = Node 22+), Git, VS Code, and the GitHub CLIchoco install -y nodejs-lts git vscode gh
# 3. Refresh PATH in this session so node/npm/git resolve without reopeningImport-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"refreshenv
# 4. Install Claude Code (native installer — standalone binary, no npm)irm https://claude.ai/install.ps1 | iex
# 5. Add Claude Code's install dir (~/.local/bin) to the User PATH, permanently$bin = "$env:USERPROFILE\.local\bin"$userPath = [Environment]::GetEnvironmentVariable("Path","User")if ($userPath -notlike "*$bin*") { [Environment]::SetEnvironmentVariable("Path", "$userPath;$bin", "User")}$env:Path = [Environment]::GetEnvironmentVariable("Path","User") + ";" + [Environment]::GetEnvironmentVariable("Path","Machine")
# 6. Install the Codex and Copilot CLIs (npm globals)npm install -g @openai/codex @github/copilot
# 7. Verify every tool resolvesnode -v; npm -v; git --version; code --version; gh --version; codex --version; claude --version; copilot --versionThe final line should print a version for each tool. If it does, this DevBox is ready to snapshot.
Once the verify line prints clean versions, you have a fully-loaded Windows DevBox. Everything from here is about never doing this again.
Level 2 — Snapshot it into a golden image
Section titled “Level 2 — Snapshot it into a golden image”Now freeze that prepared DevBox into a reusable image. This is the standard Build an Image from a DevBox flow — see the full guide for details and validation limits.
-
Open Create Image and select the From DevBox segment.
-
Pick the same worker the DevBox is running on (images stay on the worker that builds them).
-
Select your prepared DevBox as the source, give the image a name (e.g.
windows-dev-golden), and submit. -
A Windows snapshot briefly stops the DevBox to capture a consistent disk, then bakes the post-install disk into the image. This takes a few minutes.
Boot in seconds from your golden image
Section titled “Boot in seconds from your golden image”Because a snapshot lives on exactly one worker, the launch has to land on that worker — the target picker handles it.
-
Open the launch flow and open the target picker.
-
Select the worker that holds your golden image. This pins the launch to that worker.
-
Pick your golden image — filter by name, tag, or capability.
-
Launch.
The DevBox boots from the baked post-install disk, so it reaches a working desktop in seconds instead of 20–30 minutes — with Node, Git, VS Code, and your AI CLIs already installed and on PATH. Rebuild the golden image whenever your toolchain changes; day to day, you just launch from it.