bhyve how to start desktop on fb15 guest in bhyve?

I created a FreeBSD 15 virtual machine using bhyve on a FreeBSD 15 host. I installed xorg and startx but found 0 GPUs. How can I get the guest to start the desktop environment?
 
sorry, found 0 GPUs is when start sway
startx is Cannot run in framebuffer mode. Please specify bufIDs for all framebuff devices
 
It shouldn't be necessary. I see from another post that you're not using vm-bhyve, which is all I'm familiar with, but at any rate, to get X running on a FreeBSD VM, I install xorg-server, xf86-input-libinput, xf86-video-scfb xinit (which provides startx), then a window manager, alacritty terminal and perhaps liberation-fonts-ttf. I don't really keep track of what else that pulls in.
 
Sorry, thought it said VirtualBox.

In any case, it'll work with bhyve(8) but you must UEFI boot the VM and enable the graphics/VNC console. Then you can use the scfb(4) video driver for Xorg.
I installed xf86-video-scfb but I don't know how to use it.
kldload scfb
says
kldload: Can't load scfb: No.such file or directory
 
You would not kload it. Once it's installed if you run startx, then X should start. You might be better off with vm-bhyve, which automates some of it. Then you could use a template like
loader="uefi" graphics="yes" xhci_mouse="yes" cpu=1 memory=2048M network0_type="virtio-net" network0_switch="public" disk0_type="virtio-blk" disk0_name="disk0.img"
vermaden has a page on vm-bhyve, https://vermaden.wordpress.com/2023/08/18/freebsd-bhyve-virtualization/

As SirDice wrote above, you need to have the uefi loader to have X (or Wayland) working in a bhyve vm.
 
Back
Top