Abstract
Architecture specific notes for OpenBSD guests under QEMU, with working command lines where installation succeeds and failure points where it does not.
These notes generalise the working cases from
obsd.sh, a sysupgrade(8)
influenced helper for headless OpenBSD VMs with serial console output.
With current QEMU on an amd64 host, emulated systems are fast enough for
ports work; riscv64 builds gcc-16.1.0 in 1 to 2 days, close to a real
sparc64 machine.
As of 2026-08-20, the OpenBSD-current kernel and QEMU port include the patches cited in this article; those links remain historical notices.
amd64
OpenBSD/amd64 works with standard qemu-system-x86_64 emulation and
virtio networking:
qemu-system-x86_64 \
-nographic \
-m 16G \
-smp 4 \
-hda amd64.qcow2 \
-netdev user,id=net0 \
-device virtio-net-pci,netdev=net0qemu-system-x86_64 \
-nographic \
-m 16G \
-smp 4 \
-hda amd64.qcow2 \
-netdev user,id=net0 \
-device virtio-net-pci,netdev=net0Serial console selection remains manual:
stty com0 115200
set tty com0arm64
OpenBSD/arm64 works on the QEMU virt machine with U-Boot from the
OpenBSD u-boot-aarch64 port:
qemu-system-aarch64 \
-machine virt \
-cpu cortex-a57 \
-nographic \
-bios /usr/local/share/u-boot/qemu_arm64/u-boot.bin \
-m 16G \
-smp 4 \
-drive file=arm64.qcow2,format=qcow2,if=none,id=hd0 \
-device virtio-blk-pci,drive=hd0,bootindex=1 \
-netdev user,id=net0 \
-device virtio-net-device,netdev=net0qemu-system-aarch64 \
-machine virt \
-cpu cortex-a57 \
-nographic \
-bios /usr/local/share/u-boot/qemu_arm64/u-boot.bin \
-m 16G \
-smp 4 \
-drive file=arm64.qcow2,format=qcow2,if=none,id=hd0 \
-device virtio-blk-pci,drive=hd0,bootindex=1 \
-netdev user,id=net0 \
-device virtio-net-device,netdev=net0armv7
OpenBSD/armv7 works on the QEMU virt machine with cortex-a15, U-Boot
from the OpenBSD u-boot-arm port, 3G of RAM, and a uniprocessor
guest:
qemu-system-arm \
-machine virt,virtualization=on \
-cpu cortex-a15 \
-nographic \
-bios /usr/local/share/u-boot/qemu_arm/u-boot.bin \
-m 3G \
-smp 1 \
-drive file=armv7.qcow2,format=qcow2,if=none,id=hd0 \
-device virtio-blk-device,drive=hd0,bootindex=1 \
-netdev user,id=net0 \
-device virtio-net-device,netdev=net0qemu-system-arm \
-machine virt,virtualization=on \
-cpu cortex-a15 \
-nographic \
-bios /usr/local/share/u-boot/qemu_arm/u-boot.bin \
-m 3G \
-smp 1 \
-drive file=armv7.qcow2,format=qcow2,if=none,id=hd0 \
-device virtio-blk-device,drive=hd0,bootindex=1 \
-netdev user,id=net0 \
-device virtio-net-device,netdev=net0OpenBSD/armv7 does not support SMP; with more than 3G of RAM U-boot
failure:
EFI boot manager: Cannot load any image
Found EFI removable media binary efi/boot/bootarm.efi
** Reading file would overwrite reserved memory **
Failed to load 'efi/boot/bootarm.efi'Virtio networking needs an OpenBSD if_vio.c alignment fix1. USB
networking avoids that path, but the installer and installed system use
different interface names, cdce0 and urndis0; other NICs, including
em0 and e1000, also hung.
The target disk has an MSDOS boot partition visible as i:, so
autopartitioning must fit within 14 OpenBSD partitions.
hppa
OpenBSD/hppa works on the QEMU B160L machine with SCSI disk and
e1000 networking:
qemu-system-hppa \
-machine B160L \
-nographic \
-m 4G \
-smp 2 \
-boot c \
-drive file=hppa.qcow2,format=qcow2,if=scsi,index=0 \
-netdev user,id=net0 \
-device e1000,netdev=net0qemu-system-hppa \
-machine B160L \
-nographic \
-m 4G \
-smp 2 \
-boot c \
-drive file=hppa.qcow2,format=qcow2,if=scsi,index=0 \
-netdev user,id=net0 \
-device e1000,netdev=net0i386
OpenBSD/i386 follows the same path as OpenBSD/amd64: headless boot, virtio networking, and manual serial console selection2.
qemu-system-i386 \
-nographic \
-m 4G \
-smp 2 \
-hda i386.qcow2 \
-netdev user,id=net0 \
-device virtio-net-pci,netdev=net0qemu-system-i386 \
-nographic \
-m 4G \
-smp 2 \
-hda i386.qcow2 \
-netdev user,id=net0 \
-device virtio-net-pci,netdev=net0macppc
OpenBSD/macppc works on the QEMU mac99 machine with an OpenBSD
firmware property fix3, patched QEMU4, a patched OpenBIOS
image567891011, one CPU, and at most 2G of RAM:
qemu-system-ppc \
-machine mac99,via=cuda,graphics=off,usb=off \
-cpu 7400 \
-nographic \
-prom-env input-device=ttya \
-prom-env output-device=ttya \
-prom-env 'boot-command=boot hd:,ofwboot /bsd' \
-bios /path/to/openbios-ppc-obsd-ba2f9b9.elf \
-global cuda.sr-delay-ns=0 \
-m 2G \
-smp 1 \
-boot c \
-drive file=macppc.qcow2,format=qcow2,if=ide,index=0 \
-netdev user,id=net0 \
-device e1000,netdev=net0qemu-system-ppc \
-machine mac99,via=cuda,graphics=off,usb=off \
-cpu 7400 \
-nographic \
-prom-env input-device=ttya \
-prom-env output-device=ttya \
-prom-env 'boot-command=boot hd:,ofwboot /bsd' \
-bios /path/to/openbios-ppc-obsd-ba2f9b9.elf \
-global cuda.sr-delay-ns=0 \
-m 2G \
-smp 1 \
-boot c \
-drive file=macppc.qcow2,format=qcow2,if=ide,index=0 \
-netdev user,id=net0 \
-device e1000,netdev=net0octeon
OpenBSD/octeon works on the prototype QEMU octeon3 machine from the
submitted Octeon III EBB7304 series12, with U-Boot from the OpenBSD
u-boot-octeon port:
qemu-system-mips64 \
-machine octeon3 \
-accel tcg,thread=multi \
-nographic \
-bios /usr/local/share/u-boot/octeon_ebb7304/u-boot.bin \
-m 16G \
-smp 4 \
-drive file=octeon.qcow2,format=qcow2,if=none,id=hd0 \
-device usb-storage,drive=hd0 \
-netdev user,id=net0 \
-device e1000,netdev=net0qemu-system-mips64 \
-machine octeon3 \
-accel tcg,thread=multi \
-nographic \
-bios /usr/local/share/u-boot/octeon_ebb7304/u-boot.bin \
-m 16G \
-smp 4 \
-drive file=octeon.qcow2,format=qcow2,if=none,id=hd0 \
-device usb-storage,drive=hd0 \
-netdev user,id=net0 \
-device e1000,netdev=net0powerpc64
OpenBSD/powerpc64 works on the QEMU powernv9 machine with two OpenBSD
fixes13, patched QEMU14, and talos-ii-pnor-bootkernel installed:
qemu-system-ppc64 \
-machine powernv9 \
-cpu power9 \
-nographic \
-bios /usr/local/share/qemu/skiboot.lid \
-kernel /usr/local/share/talos-ii-pnor/pnor.BOOTKERNEL \
-m 16G \
-smp 4 \
-device ich9-ahci,id=ahci0,bus=pcie.0 \
-drive file=powerpc64.qcow2,format=qcow2,if=none,id=hd0 \
-device ide-hd,bus=ahci0.0,drive=hd0,bootindex=1 \
-netdev user,id=net0 \
-device e1000e,bus=pcie.1,netdev=net0qemu-system-ppc64 \
-machine powernv9 \
-cpu power9 \
-nographic \
-bios /usr/local/share/qemu/skiboot.lid \
-kernel /usr/local/share/talos-ii-pnor/pnor.BOOTKERNEL \
-m 16G \
-smp 4 \
-device ich9-ahci,id=ahci0,bus=pcie.0 \
-drive file=powerpc64.qcow2,format=qcow2,if=none,id=hd0 \
-device ide-hd,bus=ahci0.0,drive=hd0,bootindex=1 \
-netdev user,id=net0 \
-device e1000e,bus=pcie.1,netdev=net0riscv64
OpenBSD/riscv64 works with OpenSBI and U-Boot from the OpenBSD
u-boot-riscv64 port:
qemu-system-riscv64 \
-machine virt \
-nographic \
-bios /usr/local/share/opensbi/generic/fw_jump.bin \
-kernel /usr/local/share/u-boot/qemu-riscv64_smode/u-boot.bin \
-m 16G \
-smp 4 \
-hda riscv64.qcow2 \
-netdev user,id=net0 \
-device virtio-net-device,netdev=net0qemu-system-riscv64 \
-machine virt \
-nographic \
-bios /usr/local/share/opensbi/generic/fw_jump.bin \
-kernel /usr/local/share/u-boot/qemu-riscv64_smode/u-boot.bin \
-m 16G \
-smp 4 \
-hda riscv64.qcow2 \
-netdev user,id=net0 \
-device virtio-net-device,netdev=net0sparc64
OpenBSD/sparc64 works on the QEMU sun4u machine with an OpenBSD boot
path fix15, a patched OpenBIOS image1617181920, and
one CPU:
qemu-system-sparc64 \
-machine sun4u \
-nographic \
-prom-env boot-device=disk \
-bios /path/to/openbios-sparc64-obsd-daa1b25.elf \
-m 16G \
-smp 1 \
-hda sparc64.qcow2 \
-net nic,model=sunhme \
-net userqemu-system-sparc64 \
-machine sun4u \
-nographic \
-prom-env boot-device=disk \
-bios /path/to/openbios-sparc64-obsd-daa1b25.elf \
-m 16G \
-smp 1 \
-hda sparc64.qcow2 \
-net nic,model=sunhme \
-net userUnsupported
OpenBSD/alpha is blocked by QEMU firmware support. QEMU provides only
the clipper machine with emulation PALcode, not an SRM console able to
boot OpenBSD media. Direct -kernel loading bypasses the OpenBSD boot
path and does not provide the PROM state OpenBSD expects.
OpenBSD/landisk has no matching QEMU machine. QEMU provides r2d-plus,
not the IO-DATA LANDISK platform. Disk boot lacks LANDISK firmware,
and direct kernel entry resets before the console is initialized.
OpenBSD/luna88k has no matching QEMU m88k system emulator.
The required OpenBSD
if_vio.cpatch was posted toopenbsd-bugsand is available at https://marc.info/?l=openbsd-tech&m=178111370945923&q=raw. ↩︎QEMU 11.1.0 includes the required i386 fix; the original patch remains available as a historical notice at https://patchew.org/QEMU/20260609002802.729485-1-richard.henderson@linaro.org/. ↩︎
The OpenBSD patch limits
OF_getprop()copies to the requested buffer size: https://marc.info/?l=openbsd-tech&m=178514780514282&w=2. ↩︎The required QEMU macppc patch series is available at https://patchew.org/QEMU/20260903115229.95811-1-kirill@korins.ky/. ↩︎
The OpenBIOS patch propagating device read failures is available at https://github.com/catap/openbios/commit/e61a69213260e7eae8bef4a8ef0ce5c0b0f6be8a.patch. ↩︎
The OpenBIOS patch isolating filesystem state is available at https://github.com/catap/openbios/commit/d14f3c85b567048f0c756b7b030427245416e23d.patch. ↩︎
The OpenBIOS patch fixing seek result handling is available at https://github.com/catap/openbios/commit/c05a3d608e452276045e7ec8804a235f8e710e5f.patch. ↩︎
The OpenBIOS patch decoding FAT metadata on big endian PPC is available at https://github.com/catap/openbios/commit/06bd9d43e0755027cad82ba165cb3d2fdd3137a9.patch. ↩︎
The OpenBIOS patch treating PPC partition
0as the whole disk is available at https://github.com/catap/openbios/commit/d8d459af79ae177dd167be3909ef6f0fab91a563.patch. ↩︎The OpenBIOS patch enabling FAT support on PPC is available at https://github.com/catap/openbios/commit/ba2f9b93d4a157f6d29df606ec4abf6f605e7187.patch. ↩︎
A prebuilt OpenBIOS image with these patches is available at https://github.com/catap/obsd.sh/raw/faed05a1364c0b0b96d97afa51846ac78ac4150f/openbios-ppc-obsd-ba2f9b9.elf. ↩︎
The current QEMU Octeon III EBB7304 machine series is available at https://patchew.org/QEMU/20260903120510.34876-1-kirill@korins.ky/; the accompanying xHCI Event Ring Full handling patch is available at https://patchew.org/QEMU/20260719215455.96122-1-kirill@korins.ky/. ↩︎
The OpenBSD RAMDISK patch adds
em(4): https://marc.info/?l=openbsd-tech&m=178101765759037&q=raw. The PTCR PATS encoding patch is available at https://marc.info/?l=openbsd-tech&m=178394830014223&q=raw. ↩︎The QEMU PowerNV patch for booting OpenBSD on POWER9 is available at https://patchew.org/QEMU/20260719145559.94342-1-kirill@korins.ky/. ↩︎
The OpenBSD patch accepts
idenodes in sparc64 IDE boot paths: https://marc.info/?l=openbsd-tech&m=178126606643187&q=raw. ↩︎The OpenBIOS patch fixing crashes with non installer OpenBSD kernels is available at https://github.com/catap/openbios/commit/9151118aea489f9fffa40c60ee3b1d93383fb96b.patch. ↩︎
The OpenBIOS patch fixing crashes on reboot is available at https://github.com/catap/openbios/commit/8d5ed09f0420389a27394b7c1b7d40ae7aab9d32.patch. ↩︎
The OpenBIOS patch allowing more than
4Gof RAM is available at https://github.com/catap/openbios/commit/cd90de7bda9006e2382d10302555a4cf825ea425.patch. ↩︎The OpenBIOS patch clearing
PT_LOADBSS during program loading is available at https://github.com/catap/openbios/commit/daa1b2595b2347e8031431dae1aeded976fd7057.patch. ↩︎A prebuilt OpenBIOS image with these patches is available at https://github.com/catap/obsd.sh/raw/9b03445339781e8720cf5c98bedc5f26c10b86f6/openbios-sparc64-obsd-daa1b25.elf. ↩︎