Move the QEMU hardware definition of the Windows 11 VM into qemu/windows11.ini and qemu/windows11-amd64.ini, loaded with -readconfig like the Linux launchers. The network stays in the launcher because a config file section cannot hold two hostfwd entries. Add --rdp-port and --ssh-port, which override the WIN11_VM_*_PORT environment variables. WIN11_VM_MEMORY and WIN11_VM_CPUS are replaced by the config file. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
105 lines
2.5 KiB
INI
105 lines
2.5 KiB
INI
# QEMU configuration for the Windows 11 virtual machine. The machine type is in
|
|
# windows11-amd64.ini, 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
|
|
# have no -readconfig equivalent (-cpu, -display) and the installation media
|
|
# attached by --install-from-iso are still added by the launcher.
|
|
|
|
[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"
|
|
|
|
[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. It is attached through IDE so that Windows can boot before the
|
|
# VirtIO storage driver is installed; the installation media of
|
|
# --install-from-iso use ide.1 to ide.3.
|
|
[drive "system_disk"]
|
|
if = "none"
|
|
format = "qcow2"
|
|
file = "${disk_image}"
|
|
|
|
[device "system_disk-dev"]
|
|
driver = "ide-hd"
|
|
drive = "system_disk"
|
|
bus = "ide.0"
|
|
bootindex = "1"
|
|
|
|
# The NIC is attached to the user-mode network "net0", which the launcher
|
|
# defines with -netdev because a config file section cannot hold more than one
|
|
# hostfwd (Remote Desktop and SSH are both forwarded to the host).
|
|
[device "nic0"]
|
|
driver = "e1000e"
|
|
netdev = "net0"
|
|
|
|
# Host/guest clipboard integration through the SPICE vdagent channel.
|
|
[device "virtio_serial"]
|
|
driver = "virtio-serial-pci"
|
|
|
|
[chardev "vdagent"]
|
|
backend = "qemu-vdagent"
|
|
name = "vdagent"
|
|
clipboard = "on"
|
|
mouse = "off"
|
|
|
|
[device "vdagent-port"]
|
|
driver = "virtserialport"
|
|
chardev = "vdagent"
|
|
name = "com.redhat.spice.0"
|
|
|
|
# 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"
|
|
|
|
# QEMU Guest Agent and the QEMU monitor, both on sockets in the state directory.
|
|
[chardev "qga"]
|
|
backend = "socket"
|
|
path = "${guest_agent_socket}"
|
|
server = "on"
|
|
wait = "off"
|
|
|
|
[device "qga-port"]
|
|
driver = "virtserialport"
|
|
chardev = "qga"
|
|
name = "org.qemu.guest_agent.0"
|
|
|
|
[chardev "monitor"]
|
|
backend = "socket"
|
|
path = "${monitor_socket}"
|
|
server = "on"
|
|
wait = "off"
|
|
|
|
[mon "monitor0"]
|
|
chardev = "monitor"
|
|
mode = "readline"
|