Though nvmm was ported from netbsd to dfbsd,
it comes with some perks. This script starts
netbsd vm on dfbsd host headless, with host forwarding.
qemu-system-x86_64 \
-machine type=q35,accel=nvmm \
-smp cpus=2 -m 4G \
-drive file=nbsd.qcow2,if=none,id=disk0 \
-device virtio-blk-pci,drive=disk0 \
-device virtio-net-pci,netdev=net0 \
-object rng-random,id=rng0,filename=/dev/urandom \
-device virtio-rng-pci,rng=rng0 \
-nographic \
-netdev user,id=net0,hostfwd=tcp:192.168.1.20:6022-:22,hostfwd=tcp:127.0.0.1:6022-:22 \
> /dev/null 2>&1 &