If you using loader="grub", the required command get automatically injected for correct serial output. Unfortunatly, modern Linux distributions like Ubuntu 20.20 LTS are requiring UEFI to boot properly without modification of the upstream image. To enable proper output, we have to alter the grub configuration in the guest.
Ubuntu 20.20 LTS
Create a file /etc/default/grub.d/99-bhyve.cfg with the following content:
Now run update-grub to activate the new settings. After the next reboot, vm console <guest> should output the console content.
Ubuntu 22.04 LTS
Create a file /etc/default/grub.d/99-bhyve.cfg with the following content:
Now run sudo update-grub to activate the new settings. After the next reboot, vm console <guest> should output the console content.
CentOS 7
Following the sample template and Red Hat's official documentation, open /etc/default/grub and update with the following content:
Now run grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg to activate the new settings. After the next reboot, vm console <guest> should output the console content.
AlmaLinux 8
Following the sample template and Red Hat's official documentation, perform the following commands as root:
Note: If you are desperate and cannot type in a pipe symbol (|) through VNC, type Alt+124. See here for reference.
After the next reboot, vm console <guest> should output the console content.