From 330d3f5417cea22b41ac8da3b700b8ffe22d8975 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Fri, 7 Aug 2026 22:25:42 +0900 Subject: [PATCH] Fix Windows 11 unattended install stalling in Setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem Unattended **Windows 11** installs stall in Windows Setup and never complete — the VM never reaches the desktop, so RDP never comes up. Two fields in the `w11` `autounattend.xml` cause it: 1. **Empty product key.** `` — an empty `` makes Setup stop and prompt for a product key. 2. **`InstallFrom` names an image the current ISO does not contain.** `` `/IMAGE/NAME` = `Windows 10 Pro`. `/IMAGE/NAME` matches the WIM **`Name`** field. On the current English Windows 11 25H2 ISO no image has the `Name` `Windows 10 Pro`, so Setup cannot resolve the image and falls back to the interactive **"Select Image"** screen and waits. Console (Glish) with the base template, English 25H2 — stuck at: ``` Windows 11 Setup — Select Image Windows 11 Home / Home N / Home Single Language Windows 11 Education / Education N Windows 11 Pro / Pro N / ... [Back] [Next] <- waits for a human; unattended install never proceeds ``` ### Why this regressed — reconciliation with #9 #9 correctly established (via `wiminfo`) that on an **older** Windows 11 ISO the Pro image's WIM `Name` was literally `Windows 10 Pro` (only its *Display Name* was `Windows 11 Pro`), so `/IMAGE/NAME = "Windows 10 Pro"` matched and selected Pro. Microsoft has since corrected that field. `wiminfo` of the **current** English 25H2 ISO shows: ``` Index 6: Name: Windows 11 Pro Description: Windows 11 Pro Index 7: Name: Windows 11 Pro N ... (no image is named "Windows 10 Pro") ``` So the hardcoded name matched then and does **not** match now. Pinning a WIM `Name` string is fragile across ISO builds — which is exactly what broke here. ## Fix Only the `w11` template changes: - Set the product key to the generic Windows 11 **Pro** setup key `VK7JG-NPHTM-C97JM-9MPGT-3V66T`. On multi-edition client media the **product key drives edition selection**, so Setup installs Pro without an `InstallFrom` name to match — independent of the WIM `Name` string and of localization. - **Remove the `InstallFrom` block** and add `OnError` as a guard. The `2k22` template is intentionally left unchanged: it keeps its `InstallFrom` (`Windows Server 2022 SERVERDATACENTER`) and no product key, which is correct — Server **evaluation** media has no product key to drive selection, and its edition-code `Name` is stable. ## Testing Deployed on Linode (`jp-tyo-3`, `g6-standard-4`). Discriminating 1-variable A/B on English Windows 11 25H2 — both instances use the **same** build (the ENOSPC-fixed stage3), so the media is identical and only the `autounattend` differs: - **Base `w11` autounattend:** Windows Setup stalls at "Select Image" (console screenshot above); never installs, no RDP. - **This fix:** installs Windows 11 Pro unattended and reaches RDP — raw X.224 Connection Confirm `03 00 00 13 0e d0 …`. - **`wiminfo`** of the ISO (separate Ubuntu instance) confirms the Pro image's `Name` is `Windows 11 Pro`, and that no image is named `Windows 10 Pro`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- install-windows.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/install-windows.sh b/install-windows.sh index 9ae7f79..cda8861 100644 --- a/install-windows.sh +++ b/install-windows.sh @@ -889,21 +889,16 @@ cat > /root/autounattend.xml< true - + VK7JG-NPHTM-C97JM-9MPGT-3V66T - - - /IMAGE/NAME - Windows 10 Pro - - 0 2 + OnError