11 Commits
Author SHA1 Message Date
GuofangandClaude Sonnet 5.5 fe7250870e Attach the cloud-init seed ISO only when the VM disk is created
cloud-init reads the seed on the first boot only, so the Linux launchers now
mount it just for the run that creates the overlay disk. The seed drive moves
from the config files to the launcher arguments.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 11:19:48 +08:00
GuofangandClaude Sonnet 5.5 78f6fd424b Read port forwards from per-VM forwards.conf files
A QEMU config file section cannot hold more than one hostfwd entry, so
the forwards move out of the ini files into qemu/<vm>/forwards.conf, one
"LABEL HOST_PORT GUEST_PORT" rule per line. The new vmforwards.py parses
them, skips rules whose host port is taken and builds the -netdev
argument, which every launcher now passes instead of relying on a
netdev section in the ini or on -nic.

The ini files move to qemu/<vm>/config.ini and qemu/<vm>/<os>-<arch>.ini.
The *_SSH_PORT / *_RDP_PORT variables and --rdp-port / --ssh-port still
replace the host port of the SSH and RDP rules.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 14:55:30 +08:00
guofangandClaude Sonnet 5.5 69e2141b7c Use vm/ instead of the hidden .vm/ as the default state directory
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 23:41:21 +08:00
GuofangandClaude Sonnet 5.5 fd1d9d651d Split the QEMU configs by host system and architecture
Replace qemu/<guest>-<arch>.ini with qemu/<guest>-<os>-<arch>.ini, where os is
linux or darwin, the name platform.system() reports. The accelerators move out
of the shared <guest>.ini into these files (KVM on Linux, HVF on macOS, TCG as
the fallback). The launchers pick the file from the host system and
architecture, and reject amd64 guests on macOS hosts, so no darwin-amd64 files
exist.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 15:05:02 +08:00
GuofangandClaude Opus 5.5 649399aaa1 Print the SSH command again in the Debian and Fedora launchers
Moving the SSH port forward into the QEMU config files dropped the
launchers' SSH hint. Read the host port forwarded to guest port 22 from
the rendered config and print the matching ssh command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdbBg69LciFz8kjVCtnkbj
2026-10-11 13:44:52 +08:00
guofangandClaude Opus 5.5 1251b88164 Disable QEMU's default NIC in the Debian and Fedora launchers
A [netdev] in a -readconfig file does not stop QEMU from adding its
default NIC, so the guests had a second user-mode network without the
SSH port forward. Both NICs got 10.0.2.15 over DHCP, and SSH only worked
on boots where the forwarded NIC won the race for the default route.

Removing the default NIC shifts the other PCI devices down one slot, so
existing VMs may need their UEFI variable store reset to boot again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 00:47:00 +08:00
GuofangandClaude Opus 5.5 204051f930 Add --download-only to the VM launchers
The option downloads the media a launcher would fetch automatically and
exits without checking for QEMU, creating a VM disk or starting the VM:
the base image for Debian, AlmaLinux and Fedora, and the VirtIO tools
ISO for Windows 11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKxXLyiL7XJ3a9e8HmR2my
2026-09-30 10:56:27 +08:00
GuofangandClaude Opus 5.5 be9291c57b Load the Fedora 44 VM hardware from QEMU config files
Apply the Debian launcher's config file layout to Fedora: the shared
qemu/fedora44.ini and qemu/fedora44-<arch>.ini replace the inline QEMU
arguments and the FEDORA_VM_MEMORY, FEDORA_VM_CPUS and
FEDORA_VM_SSH_PORT variables; FEDORA_VM_QEMU_CONFIG selects a different
shared config file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKxXLyiL7XJ3a9e8HmR2my
2026-09-30 10:26:28 +08:00
GuofangandClaude Opus 5.5 3561fc6729 Remove shell VM launchers in favor of the Python ones
Delete run-*.sh and point the documentation at run-*.py. The
seediso build-seed.sh helpers stay, as the Python launchers call them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HL6bzSwWGNwru9bDS9ZCLg
2026-09-30 09:22:40 +08:00
GuofangandClaude Opus 5.5 8a7f974c11 Add --state-dir option to the Python VM launchers
Let each run-*.py launcher take the VM directory (disk, seed ISO, UEFI
variables, PID file, console log) from the command line, taking
precedence over the *_STATE_DIR environment variable. Paths derived
from the state directory are now computed after argument parsing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K1dybYsc36kf3gUPB7NuNB
2026-09-29 13:35:32 +08:00
GuofangandClaude Opus 5.5 b5a2061276 Add Python ports of the VM launchers
Each run-*.py mirrors its run-*.sh counterpart: same options, environment
variables, messages and QEMU command line. Unlike the shell scripts, the
Python ports use a portable /usr/bin/env shebang.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S8ZGHSJ5JogcTAYhPNxXTV
2026-09-29 13:03:37 +08:00