Make build-windows-base.sh self-contained and produce a clean base image

The script no longer needs the parent repository or SSH: it builds an answer
ISO from windows11/seed/Autounattend.xml, installs Windows from the ISO in
QEMU (hardware in windows11/qemu uses only devices with inbox Windows
drivers), and the answer file generalizes the image with sysprep at the end.

The base holds only Windows: no account (the built-in Administrator is
disabled), no SSH, no settings, no VirtIO drivers, no machine identity and no
cached answer files. VMs are configured on first boot from an Unattend.xml on
an attached CD-ROM. Add --window and --from-img; press a key at the ISO boot
prompt with the z key, which neither UEFI nor Windows Setup ignores or acts on.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GuofangandClaude Sonnet 5.5 committed 2026-11-02 11:19:26 +08:00
1 parent 1dc40655df
commit cb01d2c120
7 files changed
+525 -150

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
# macOS host, arm64 part of the Windows 11 QEMU configuration; read after config.ini.
# Accelerators are tried in order: HVF on macOS, else emulation.
[accel]
accel = "hvf"
[accel]
accel = "tcg"
# build-windows-base.sh adds kernel-irqchip=off unless installing with
# --from-img (see there).
[machine]
type = "virt"
# The "virt" machine has no IDE. NVMe and USB mass storage (used by the
# installation media) both have inbox Windows drivers.
[device "system_disk-dev"]
driver = "nvme"
drive = "system_disk"
serial = "win11disk"
bootindex = "1"
# Windows has no inbox driver for virtio-net or virtio-gpu, so the network card
# is an Intel e1000e and the display is ramfb (a fixed-size framebuffer).
[device "nic0"]
driver = "e1000e"
netdev = "net0"
[device "gpu0"]
driver = "ramfb"
[device "kbd0"]
driver = "usb-kbd"