Files
vm-images/windows11/qemu/config.ini
T
GuofangandClaude Sonnet 5.5 cb01d2c120 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>
2026-11-02 11:19:26 +08:00

61 lines
1.7 KiB
INI

# QEMU configuration for the Windows 11 virtual machine. The accelerators and machine type
# are in <os>-<arch>.ini (os is linux or darwin), which QEMU reads after
# this file.
#
# build-windows-base.sh fills in the file path placeholders below, writes the result
# to <state dir>/qemu.ini and passes it to QEMU with -readconfig. Options that
# have no -readconfig equivalent (-cpu, -display), the network and the installation
# media are still added by the script.
#
# Every device here has an inbox Windows driver: the base image made from this
# installation contains no VirtIO drivers.
[name]
guest = "windows11"
[memory]
size = "8G"
[smp-opts]
cpus = "8"
# UEFI firmware: read-only code and the per-VM variable store.
[drive "pflash0"]
if = "pflash"
format = "raw"
readonly = "on"
file = "${uefi_code}"
[drive "pflash1"]
if = "pflash"
format = "raw"
file = "${uefi_vars}"
# System disk image; the device that exposes it (and the NIC, which is
# attached to the user-mode network "net0" that the installer defines with
# -netdev) is in the architecture file.
[drive "system_disk"]
if = "none"
format = "qcow2"
file = "${disk_image}"
# Register the USB tablet after vdagent so QEMU selects it as the active pointer.
[device "usb_controller"]
driver = "qemu-xhci"
[device "tablet0"]
driver = "usb-tablet"
bus = "usb_controller.0"
# The QEMU monitor, on a socket in the state directory: build-windows-base.sh
# presses a key through it at the "Press any key to boot from CD or DVD" prompt.
[chardev "monitor"]
backend = "socket"
path = "${monitor_socket}"
server = "on"
wait = "off"
[mon "monitor0"]
chardev = "monitor"
mode = "readline"