Can somebody help me with #NetBSD running in #FreeBSD bhyve? When I run startx inside NetBSD I get kernel panic (in the VM, not host). This is my command:

bhyve \
-D \
-S \
-H \
-w \
-c 4 \
-m 32G \
-s 0,hostbridge \
-s 3,nvme,/dev/zvol/zroot/netbsd \
-s 10,virtio-net,tap1 \
-s 29,fbuf,tcp=0.0.0.0:5901,w=1024,h=768 \
-s 30,xhci,tablet \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
netbsd

@meka What is the kernel panic? (transcript or screenshot would be helpful!)
@meka ...and also the NetBSD version that was tried is a good data point.

@iamleot wait a minute, this might be bhyve bug:

Assertion failed: (error == 0), function modify_bar_registration, file /usr/src/usr.sbin/bhyve/pci_emul.c, line 706.

I wonder why only NetBSD exerts this problem. That being said, as bhyve crashes, my VNC dies, so I can't take the screenshot. Probably not even needed, as it's not NetBSD problem (I'm just guessing).

@meka @iamleot Try this work around in /usr/src/usr.sbin/bhyve/pci_fbuf.c, around line 71 & recompile bhyve:

-#define FB_SIZE (32*MB)
+#define FB_SIZE (16*MB)

-#define COLS_MAX 3840
-#define ROWS_MAX 2160
+#define COLS_MAX 1920
+#define ROWS_MAX 1200

#define COLS_DEFAULT 1024
#define ROWS_DEFAULT 768

In particular see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290098

290098 – bhyve crashes when trying to boot or run a 9front VM and other OSes