bhyve How to boot a bhyve UEFI FreeBSD guest w/framebuffer boot menu graphics?

I'd like to boot a UEFI vm-bhyve guest and see the FreeBSD orb graphic logo rather than the ASCII stick-art logo.

This does not accomplish that:

/bhyve/freebsd-guest/my.conf:
Code:
loader="uefi"
graphics="yes"
graphics_res="1280x1024"
graphics_wait="yes"
xhci_mouse="yes"
cpu=2
memory=4G
network0_type="virtio-net"
network0_switch="public"
disk0_type="nvme"
disk0_name="disk0.img"
uuid="784989bb-2f14-11ef-ace3-90e2ba78ae40"
network0_mac="58:9c:fc:0b:f6:f0"

Guest's /boot/loader.conf:
Code:
zfs_load=yes
vesa_load=yes
videomode_load=yes
splash_bmp_load=yes
kern.geom.label.gpt=1
vfs.zfs.trim.enabled=0

bootmenu-cropped.png

Also, as a vm-bhyve user who might experiment with tweaking bhyve_options in /bhyve/freebsd-guest/my.conf, how can I verify the specific bhyve command line that is being run? ps -w132 and similar always show the process as simply
Code:
bhyve: freebsd-guest (bhyve)

I've been adding:

Code:
bhyve_options="-s 29,fbuf,tcp=0.0.0.0:5900,wait"

to no avail.
 
Well, never mind the last bit, somehow I did something different and I see it now:

Code:
bhyve -c 2 -m 4G -AHPw -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
  -U 784989bb-2f14-11ef-ace3-90e2ba78ae40 -u \
  -s 0,hostbridge -s 31,lpc -s 4:0,nvme,/bhyve/freebsd-guest/disk0.img \
  -s 5:0,virtio-net,tap0,mac=58:9c:fc:0b:f6:f0 -s 6:0,fbuf,tcp=0.0.0.0:5900,w=1280,h=1024,wait \
  -s 7:0,xhci,tablet -l com1,/dev/nmdm-freebsd-guest.1A freebsd-guest
 
The specific options used can also be found in the vm-bhyve.log in the VM's directory.
 
Are you sure it's UEFI booting? Not CSM? Check sysctl machdep.bootmethod. I know this functionality has been turned off in gptzfsboot(8)/gptboot(8) due to space constraints (other, more important, functionality was needed).
 
I'd remove these from loader.conf,
Code:
vesa_load=yes
videomode_load=yes
splash_bmp_load=yes
The bootloader graphics have nothing to do with a splash screen, that's something else entirely. It does need a minimal resolution, but I think 1280x1024 should suffice.

Oh, and I suddenly see the problem, your console is set to "Dual", that's video and (serial) console. The serial console can't show graphics, so it switches to the "ASCII"-art instead.
 
Thanks again! Is it the bhyve option -l com1,/dev/nmdm-freebsd-guest.1A that establishes the serial part of the dual console, and the part that I need to omit? I'm starting bhyve from vm-bhyve which has a bhyve_options directive to add options, but I don't know a way to prevent an option from appearing in the bhyve command.

And indeed, vm info ... confirms:

Code:
  console-ports
    com1: /dev/nmdm-freebsd-guest.1B
    vnc: 0.0.0.0:5901

How can I negate the -l com1,/dev/nmdm-freebsd-guest.1A syntax in my bhyve invocation?
 
Try setting console="efi" in loader.conf. It probably defaults to efi,comconsole (that's "Dual") because it detects both a video and a serial console.
 
Still no luck with either "efi" or "vidconsole"....

My X-Y problem is I'd like to get some good-quality screenshots of what the boot menu looks like, for some in-house documentation. Is there are more straightforward/easier way than trying to get a bhyve VM to boot FreeBSD withinin a VNC viewer session, and then take screenshots of VNC viewer?
 
Code:
loader="uefi"
cpu=6
memory=4096M
ahci_device_limit="8"
network0_type="virtio-net"
network0_switch="public"
disk0_type="virtio-blk"
disk0_name="disk0.img"
graphics="yes"
xhci_mouse="yes"
passthru0="129/0/0=2:0"
uefi_vars="yes"
uefi_vars="yes" <--
This is what i had to do to boot in UEFI mode.
PS. Its for Debian Linux
 
Back
Top