I wanted to play around with NetBSD on a linux host. From the first glance, it looked simple: I built an image from sources on github, with build.sh targets from the official documentation:
git clone --depth 1 https://github.com/NetBSD/src.git
cd src
./build.sh -j8 -m amd64 -U tools
./build.sh -j8 -m amd64 -U release iso-image
It works fine, I get a NetBSD-10.99.12-amd64.dvd.iso
And then I ran it with qemu using a script like that
qemu-system-x86_64 \
-boot once=dc \
-drive file=$1,media=cdrom \
-m 1G \
-enable-kvm \
-nographic \
-pidfile vm.pid \
2>&1 | tee vm.log
It seems like it should work just fine. There are examples of people using similar configs online, including this forum. It does boot, but hangs shortly after with a warning about module failing to load:
SeaBIOS (version 1.16.3-3.fc41)
iPXE (https://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+3EFC9FF0+3EF09FF0 CA00
Booting from DVD/CD...
NetBSD/x86 cd9660 Primary Bootstrap
\\-__,------,___.
\\ __,---` NetBSD/x86 BIOS Boot
\\ `---,_. Revision 5.12 (Sat Feb 1 22:23:53 UTC 2025)
\\-,_____,.---`
\\
\\
\\
1. Boot normally
2. Boot single user
3. Drop to boot prompt
Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 0 seconds.
21796256+796928+1300224 [973908+1421952+1043079]=0x1b48458
WARNING: couldn't open /var/db/entropy-file
Loading /stand/amd64/10.99.12/modules/cd9660/cd9660.kmod
WARNING: 1 module failed to load
<no output after that, VM seems to hang>
Running a basic OS image in qemu is something very basic and surely can't be broken, so I feel like I'm doing something wrong here. Are there any known issues/gotchas with running NetBSD in qemu?