Since May 2025, NetBSD/amd64 and NetBSD/i386 have a new kernel configurations named MICROVM. These configurations permit the use of the QEMU microvm machine type, optimized for boot time and footprint, and which does not have PCI bus nor ACPI support.
Using a kernel built with this configuration allows to boot the system in about 10ms on an AMD Ryzen 7 5800X CPU, thus opening doors to fully isolated micro-services.

Here's an example on how to get such virtual machine running on a Linux/KVM host.

First build a MICROVM kernel (refer to this guide for more information about cross-compiling NetBSD):

$ cd path/to/NetBSD/src
$ ARCH=amd64 # or i386
$ ./build.sh -u -U -j12 -T obj/tooldir -m $ARCH kernel=MICROVM

You will then need a root filesystem image, you can either use an official NetBSD live image, or create your own root filesystem using smolBSD.

Finally here's the full qemu command in order to fire up a MICROVM kernel in direct/PVH mode, i.e. without the need of BIOS or UEFI, with most of devices backed by VirtIO-MMIO:

$ KERNEL=/path/to/netbsd/MICROVM/kernel
$ NBIMG=/path/to/root/filesystem.img
$ qemu-system-x86_64 -M microvm,rtc=on,acpi=off,pic=off,accel=kvm \
    -cpu host,+invtsc -kernel ${KERNEL} -append "root=ld0a console=com rw -z" \
    -device virtio-blk-device,drive=hd0 -drive file=${NBIMG},format=raw,id=hd0 \
    -device virtio-net-device,netdev=net0 -netdev user,id=net0,ipv6=off,hostfwd=::2322-:22 \
    -global virtio-mmio.force-legacy=false -display none -serial stdio

And witness the magic:

[   1.0000000] entropy: ready
[   1.0000000] NetBSD 10.99.14 (MICROVM)       Notice: this software is protected by copyright
[   1.0000000] Detecting hardware... (BOCHSCPU 0.1         )
[   1.0032414]  done.
[   1.0048665] kernel boot time: 9ms
Created tmpfs /dev (1867776 byte, 3616 inodes)
#