Files
cloudhost/qemu/ubuntu2604.ini
T
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

61 lines
1.4 KiB
INI

# QEMU configuration for the Ubuntu 26.04 virtual machine, shared by all
# architectures. The accelerators, machine type and
# platform-specific devices are in ubuntu2604-<os>-<arch>.ini (os is linux or darwin),
# which QEMU reads after this file.
#
# run-ubuntu2604.py 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, daemon mode) are still added
# by the launcher.
[name]
guest = "ubuntu2604"
[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}"
# Writable qcow2 overlay on top of the shared base image.
[drive "disk0"]
if = "none"
format = "qcow2"
file = "${disk_image}"
[device "disk0-dev"]
driver = "virtio-blk-pci"
drive = "disk0"
# cloud-init seed ISO.
[drive "seed0"]
if = "none"
format = "raw"
readonly = "on"
file = "${seed_image}"
[device "seed0-dev"]
driver = "virtio-blk-pci"
drive = "seed0"
# User-mode networking with guest SSH forwarded to the host.
[netdev "net0"]
type = "user"
hostfwd = "tcp::2225-:22"
[device "nic0"]
driver = "virtio-net-pci"
netdev = "net0"