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>
This commit is contained in:
GuofangandClaude Sonnet 5.5 committed 2026-10-17 15:05:02 +08:00
1 parent c13ebc7d11
commit fd1d9d651d
24 files changed
+234 -96

No files matched your search

-4
View File
@@ -1,4 +0,0 @@
# amd64 part of the Debian 13 QEMU configuration; read after debian13.ini.
[machine]
type = "q35"
@@ -1,4 +1,11 @@
# arm64 part of the Ubuntu 26.04 QEMU configuration; read after ubuntu2604.ini.
# macOS host, arm64 part of the Debian 13 QEMU configuration; read after debian13.ini.
# Accelerators are tried in order: HVF on macOS, else emulation.
[accel]
accel = "hvf"
[accel]
accel = "tcg"
[machine]
type = "virt"
+11
View File
@@ -0,0 +1,11 @@
# Linux host, amd64 part of the Debian 13 QEMU configuration; read after debian13.ini.
# Accelerators are tried in order: KVM on Linux, else emulation.
[accel]
accel = "kvm"
[accel]
accel = "tcg"
[machine]
type = "q35"
@@ -1,4 +1,11 @@
# arm64 part of the Debian 13 QEMU configuration; read after debian13.ini.
# Linux host, arm64 part of the Debian 13 QEMU configuration; read after debian13.ini.
# Accelerators are tried in order: KVM on Linux, else emulation.
[accel]
accel = "kvm"
[accel]
accel = "tcg"
[machine]
type = "virt"
+3 -12
View File
@@ -1,6 +1,7 @@
# QEMU configuration for the Debian 13 virtual machine, shared by all
# architectures. The machine type and architecture-specific devices are in
# debian13-<arch>.ini, which QEMU reads after this file.
# architectures. The accelerators, machine type and
# platform-specific devices are in debian13-<os>-<arch>.ini (os is linux or darwin),
# which QEMU reads after this file.
#
# run-debian13.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
@@ -10,16 +11,6 @@
[name]
guest = "debian13"
# Accelerators are tried in order: KVM on Linux, HVF on macOS, else emulation.
[accel]
accel = "kvm"
[accel]
accel = "hvf"
[accel]
accel = "tcg"
[memory]
size = "8G"
-4
View File
@@ -1,4 +0,0 @@
# amd64 part of the Fedora 44 QEMU configuration; read after fedora44.ini.
[machine]
type = "q35"
@@ -1,4 +1,11 @@
# arm64 part of the Fedora 44 QEMU configuration; read after fedora44.ini.
# macOS host, arm64 part of the Fedora 44 QEMU configuration; read after fedora44.ini.
# Accelerators are tried in order: HVF on macOS, else emulation.
[accel]
accel = "hvf"
[accel]
accel = "tcg"
[machine]
type = "virt"
+11
View File
@@ -0,0 +1,11 @@
# Linux host, amd64 part of the Fedora 44 QEMU configuration; read after fedora44.ini.
# Accelerators are tried in order: KVM on Linux, else emulation.
[accel]
accel = "kvm"
[accel]
accel = "tcg"
[machine]
type = "q35"
+24
View File
@@ -0,0 +1,24 @@
# Linux host, arm64 part of the Fedora 44 QEMU configuration; read after fedora44.ini.
# Accelerators are tried in order: KVM on Linux, else emulation.
[accel]
accel = "kvm"
[accel]
accel = "tcg"
[machine]
type = "virt"
# Unlike q35, the "virt" machine has no default GPU or USB input devices.
[device "gpu0"]
driver = "virtio-gpu-pci"
[device "usb0"]
driver = "qemu-xhci"
[device "kbd0"]
driver = "usb-kbd"
[device "tablet0"]
driver = "usb-tablet"
+3 -12
View File
@@ -1,6 +1,7 @@
# QEMU configuration for the Fedora 44 virtual machine, shared by all
# architectures. The machine type and architecture-specific devices are in
# fedora44-<arch>.ini, which QEMU reads after this file.
# architectures. The accelerators, machine type and
# platform-specific devices are in fedora44-<os>-<arch>.ini (os is linux or darwin),
# which QEMU reads after this file.
#
# run-fedora44.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
@@ -10,16 +11,6 @@
[name]
guest = "fedora44"
# Accelerators are tried in order: KVM on Linux, HVF on macOS, else emulation.
[accel]
accel = "kvm"
[accel]
accel = "hvf"
[accel]
accel = "tcg"
[memory]
size = "8G"
-4
View File
@@ -1,4 +0,0 @@
# amd64 part of the Ubuntu 26.04 QEMU configuration; read after ubuntu2604.ini.
[machine]
type = "q35"
+24
View File
@@ -0,0 +1,24 @@
# macOS host, arm64 part of the Ubuntu 26.04 QEMU configuration; read after ubuntu2604.ini.
# Accelerators are tried in order: HVF on macOS, else emulation.
[accel]
accel = "hvf"
[accel]
accel = "tcg"
[machine]
type = "virt"
# Unlike q35, the "virt" machine has no default GPU or USB input devices.
[device "gpu0"]
driver = "virtio-gpu-pci"
[device "usb0"]
driver = "qemu-xhci"
[device "kbd0"]
driver = "usb-kbd"
[device "tablet0"]
driver = "usb-tablet"
+11
View File
@@ -0,0 +1,11 @@
# Linux host, amd64 part of the Ubuntu 26.04 QEMU configuration; read after ubuntu2604.ini.
# Accelerators are tried in order: KVM on Linux, else emulation.
[accel]
accel = "kvm"
[accel]
accel = "tcg"
[machine]
type = "q35"
+24
View File
@@ -0,0 +1,24 @@
# Linux host, arm64 part of the Ubuntu 26.04 QEMU configuration; read after ubuntu2604.ini.
# Accelerators are tried in order: KVM on Linux, else emulation.
[accel]
accel = "kvm"
[accel]
accel = "tcg"
[machine]
type = "virt"
# Unlike q35, the "virt" machine has no default GPU or USB input devices.
[device "gpu0"]
driver = "virtio-gpu-pci"
[device "usb0"]
driver = "qemu-xhci"
[device "kbd0"]
driver = "usb-kbd"
[device "tablet0"]
driver = "usb-tablet"
+3 -12
View File
@@ -1,6 +1,7 @@
# QEMU configuration for the Ubuntu 26.04 virtual machine, shared by all
# architectures. The machine type and architecture-specific devices are in
# ubuntu2604-<arch>.ini, which QEMU reads after this file.
# 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
@@ -10,16 +11,6 @@
[name]
guest = "ubuntu2604"
# Accelerators are tried in order: KVM on Linux, HVF on macOS, else emulation.
[accel]
accel = "kvm"
[accel]
accel = "hvf"
[accel]
accel = "tcg"
[memory]
size = "8G"
@@ -1,4 +1,11 @@
# arm64 part of the Windows 11 QEMU configuration; read after windows11.ini.
# macOS host, arm64 part of the Windows 11 QEMU configuration; read after windows11.ini.
# Accelerators are tried in order: HVF on macOS, else emulation.
[accel]
accel = "hvf"
[accel]
accel = "tcg"
[machine]
type = "virt"
@@ -1,4 +1,11 @@
# amd64 part of the Windows 11 QEMU configuration; read after windows11.ini.
# Linux host, amd64 part of the Windows 11 QEMU configuration; read after windows11.ini.
# Accelerators are tried in order: KVM on Linux, else emulation.
[accel]
accel = "kvm"
[accel]
accel = "tcg"
[machine]
type = "q35"
+34
View File
@@ -0,0 +1,34 @@
# Linux host, arm64 part of the Windows 11 QEMU configuration; read after windows11.ini.
# Accelerators are tried in order: KVM on Linux, else emulation.
[accel]
accel = "kvm"
[accel]
accel = "tcg"
[machine]
type = "virt"
# The "virt" machine has no IDE. NVMe and USB mass storage (used by the
# installation media of --install-from-iso) 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; the guest tools installed by
# Configure-Windows.ps1 provide it.
[device "nic0"]
driver = "virtio-net-pci"
netdev = "net0"
# Unlike q35, "virt" has no default GPU or keyboard. ramfb is used rather than
# virtio-gpu because the firmware's virtio-gpu output freezes at the Windows
# boot manager; Windows drives either one through its basic display driver.
[device "gpu0"]
driver = "ramfb"
[device "kbd0"]
driver = "usb-kbd"
+3 -12
View File
@@ -1,5 +1,6 @@
# QEMU configuration for the Windows 11 virtual machine. The machine type is in
# windows11-<arch>.ini, which QEMU reads after this file.
# QEMU configuration for the Windows 11 virtual machine. The accelerators and machine type
# are in windows11-<os>-<arch>.ini (os is linux or darwin), which QEMU reads after
# this file.
#
# run-windows11.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
@@ -9,16 +10,6 @@
[name]
guest = "windows11"
# Accelerators are tried in order: KVM on Linux, HVF on macOS, else emulation.
[accel]
accel = "kvm"
[accel]
accel = "hvf"
[accel]
accel = "tcg"
[memory]
size = "8G"