Commit Graph
29 Commits
Author SHA1 Message Date
GuofangandClaude Sonnet 5.5 6064bd650d Default the install prompts to yes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 23:36:15 +08:00
GuofangandClaude Sonnet 5.5 3935e2d5e2 Download Win32-OpenSSH through the wangguofang.net GitHub proxy
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 09:28:34 +08:00
guofangandClaude Sonnet 5.5 00695cdddc Install the VirtIO drivers into the base image in audit mode
Add Install-VirtIO-Drivers.ps1, run from Autounattend.xml before sysprep, and
attach the virtio-win ISO (downloaded if missing) during the build.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 22:09:05 +08:00
guofangandClaude Sonnet 5.5 91ae8cb147 build-windows-base.sh: show a window by default, fix macOS bash 3.2 and fork crashes
Replace --window with --headless (VNC); the window is the default. Fill the
QEMU config placeholders without nested quotes (bash 3.2 kept them literally),
and run QEMU as a background job instead of -daemonize when it shows a window
(Cocoa crashes in fork()).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 21:31:10 +08:00
guofangandClaude Sonnet 5.5 4eb26e3a96 Download with 16 aria2c connections by default
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 21:00:02 +08:00
guofangandClaude Sonnet 5.5 1476b4a3de Prompt step by step for the missing base image, ISO, npm deps and Chromium
Offer to build the base QCOW2, download the ISO, run npm ci and install
Chromium (from the npmmirror mirror by default). Let Playwright locate its
own Chromium so macOS works.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 20:53:50 +08:00
guofangandClaude Sonnet 5.5 b37d1e002c Report a missing base QCOW2 image instead of a missing ISO
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 20:26:07 +08:00
GuofangandClaude Sonnet 5.5 9c5abac9bf Generalize the base image from audit mode, with hibernation off
The answer file now boots into audit mode after Setup instead of logging on
as the built-in Administrator with a password: no account or credentials in
the answer file, and no copy of one left in C:\Windows\Panther. The auditUser
commands disable the built-in Administrator, turn hibernation off (no
hiberfil.sys in the image), remove cached answer files and setup logs, and run
sysprep /generalize.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 12:51:54 +08:00
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
GuofangandClaude Sonnet 5.5 1dc40655df Add --window option to build-windows-base.sh
Show the guest in a QEMU window instead of the VNC display.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 10:05:55 +08:00
GuofangandClaude Sonnet 5.5 71c0c3d029 Add build-windows-base.sh to build the Windows 11 base image
Installs Windows unattended from the ISO in a scratch VM (under /var/tmp
by default), generalizes it with sysprep over SSH and stores the shut-down
disk as the read-only base image that run-windows11.py clones.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 16:12:23 +08:00
guofangandClaude Sonnet 5.5 30342b4e1b Make the staged ISO copy writable on macOS
macOS's openrsync ignores --chmod, so the staged directories kept the
read-only permissions of the UDF mount and wimlib-imagex split failed
with Permission denied. Run chmod -R u+rwX on the staging directory on
Darwin.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22 21:43:53 +08:00
GuofangandClaude Sonnet 5.5 592c7294c3 Add a windows11 target that downloads the Windows 11 ISO with headless Chromium
Move the Node.js script and its dependencies into nodejs/ and let
download-images.sh call it for the image architecture.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 16:45:36 +08:00
GuofangandClaude Sonnet 5.5 5e58722aca Add an openssh-win target to download the Win32-OpenSSH zip
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 14:28:13 +08:00
GuofangandClaude Sonnet 5.5 f5881cd5c8 Default the work directory to /var/tmp
/tmp is memory-backed on some systems, and the work directory holds about
10 GiB.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 13:38:47 +08:00
GuofangandClaude Sonnet 5.5 e1148cce7b Drop the redundant mkdir of the staged sources directory
rsync already creates sources/ because the ISO has one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 13:28:44 +08:00
GuofangandClaude Sonnet 5.5 d9707fd57b Stage the Windows ISO files with rsync before copying them into the image
Copy the ISO without install.wim to a staging directory, split install.wim
into it, and fill the image with one recursive mcopy instead of a mmd and
mcopy per directory. rsync --chmod keeps the staged directories writable so
that cleanup can remove them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 13:26:24 +08:00
GuofangandClaude Sonnet 5.5 dd29fd92a7 Drop .install from the Windows install disk image name
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 09:28:54 +08:00
GuofangandClaude Sonnet 5.5 2aae652569 Ignore aria2 progress files
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 14:29:06 +08:00
GuofangandClaude Sonnet 5.5 5468fdc033 Log each command in build-windows-install-disk.sh; build the image in place
Print the command line before every external command (hdiutil, udisksctl,
wimlib-imagex, sgdisk, mkfs.fat, mmd, mcopy and so on) so the log shows
which command is running. Write the image straight to the output path
instead of moving it from the work directory, and remove a partial output
if the run fails or is cancelled.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 14:20:31 +08:00
guofangandClaude Sonnet 5.5 21604f511f Add a script that builds a fast Windows installation disk image
QEMU's emulated USB CD-ROM reads the Windows ISO at a few MB/s. The script
builds a bootable FAT32 GPT disk image from the ISO, splitting install.wim into
install*.swm parts for the 4 GB FAT32 file limit, so the image can be attached
as an NVMe disk and read about 15 times faster.

It runs on macOS and Debian. The ISO has to be read as UDF: hdiutil on macOS,
mount -t udf as root on Linux, otherwise udisksctl, otherwise 7z extracts it.
A desktop session automounts the loop device that udisksctl creates, so the
existing mount point is reused when there is one. The image itself is built
without root.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 17:28:18 +08:00
guofangandClaude Sonnet 5.5 4d9e1b43d9 Match Windows 11 arm64 ISO names on arm64 hosts
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 13:51:35 +08:00
GuofangandClaude Opus 5.5 6286495d27 Add Ubuntu 26.04 cloud image
Download the Ubuntu 26.04 LTS server cloud image (release 20260927) for
amd64 and arm64 from the TUNA, NJU and official mirrors, verified with the
pinned SHA256 checksums from the release's SHA256SUMS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kwxp2XWvKnuEBifnCbhyX5
2026-10-15 09:00:08 +08:00
GuofangandClaude Opus 5.5 5ba114f5ad Download images from several mirrors at once with aria2c
Each *_IMAGE_URL may now list several mirrors of the same file. When
aria2c is installed, the file is split across all mirrors with a single
connection to each; otherwise curl or wget tries the mirrors in order,
skipping mirrors that fail or return an empty response. A partial
download is only resumed with the same downloader and mirror list.

Fedora now defaults to the TUNA, BFSU and NJU mirrors. The Aliyun
mirror is not used because it rejects aria2c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKxXLyiL7XJ3a9e8HmR2my
2026-09-30 10:56:19 +08:00
GuofangandClaude Opus 5.5 eab2cc5283 Download the Fedora 44 cloud image from the TUNA mirror
download.fedoraproject.org is slow from mainland China. The TUNA mirror
serves the same file (the pinned x86_64 SHA256 matches), and
FEDORA_IMAGE_URL still overrides the default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKxXLyiL7XJ3a9e8HmR2my
2026-09-30 10:36:46 +08:00
GuofangandClaude Opus 5.5 942c97686b Auto-detect the Windows 11 installation ISO
Instead of a hard-coded file name, find the ISO in install-iso/ by
matching *Win*11*x64*.iso (case-insensitive), picking the highest
version-sorted name when several match. The QCOW2 path is derived from
the detected ISO name, falling back to an existing *Win*11*x64*.qcow2
in base-qcow2/ when the ISO is absent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ks2ixr4KHXBtLuCet7Ch5Z
2026-09-30 09:37:04 +08:00
guofangandClaude Sonnet 5 4e86a23634 Auto-detect host architecture for downloaded images
Debian/AlmaLinux/Fedora image filenames, URLs, and checksums were
hardcoded to arm64/aarch64 (for Apple Silicon macOS), which would
silently download the wrong-architecture image on an Intel/amd64
host. Detect the architecture from the host (uname -m), normalized
to arm64/amd64, with VM_IMAGE_ARCH as an override; the run-*.sh
scripts in the parent repo use the same override so both stay in
sync. amd64 keeps the previously pinned checksums; arm64 checksums
are still unpinned pending upstream publication.

windows11 is unaffected: it stays x86_64-only, matching run-windows11.sh.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 22:01:26 +08:00
Guofang d2b46066d4 Add Fedora 44 cloud image 2026-08-30 22:41:00 +08:00
Guofang 04c0109baa Initial commit 2026-08-18 17:01:54 +08:00