On Thu, 27 Feb 2025, Greg A. Woods wrote:
So I reverted to IDE, which has been reliable, but seems about 1/3 the speed of the SCSI emulation.
Don't use any emulated HW at all, is my recommendation. Use virtio wherever you can, instead.
So, my main question is with the device emulations available in QEMU, which do people have the most luck and performance with?
I use this for QEMU on Ubuntu: ``` $ cat ~/tmp/qemu/qemu.sh #!/bin/sh set -eu cd ~/tmp/qemu test -f netbsd.qcow2 || qemu-img create -f qcow2 netbsd.qcow2 10G kvm -enable-kvm -machine ubuntu-q35,accel=kvm -device intel-iommu -m 4g \ -cpu host -smp cpus=4,cores=2,threads=2 -bios /usr/share/ovmf/OVMF.fd \ -drive file=netbsd.qcow2,if=none,id=hd0 -device virtio-blk-pci,drive=hd0 \ -object rng-random,filename=/dev/urandom,id=viornd0 -device virtio-rng-pci,rng=viornd0 \ -netdev user,id=net0,hostfwd=tcp::5555-:22 -device virtio-net-pci,netdev=net0 \ "$@" # -device virtio-gpu OR -device virtio-vga \ # -nographic -cdrom /tmp/NetBSD-10.1_STABLE-amd64.iso \ $ ``` Since you're on -HEAD, also look at the MICROVM kernel: https://github.com/NetBSD/src/blob/trunk/sys/arch/amd64/conf/MICROVM#L11 -RVP