I discovered that some time ago with CentOS7. The trick was to discover what modification is required to kernelopts to enable it.vm console ....
uses a serial port to connect to the VM. Lots of linux distrubutions don't enable the serial console, especially when you're using a graphical interface.
vmcviewer
to the gui console. After connecting vncviewer
to the guest then root is required to perform the equivalent of the following in the Linux vm so that vm-bhyve vm console
will work:# # create kernelopts update script for Rocky Linux 8 (RHEL-8 / CentOS-8)
# echo ' grub2-editenv - set " ' > grub2_kernelopts.txt
# grub2-editenv - list | grep kernelopts >> grub2_kernelopts.txt
# echo ' console=tty0 console=ttyS0,115200" ' >> grub2_kernelopts.txt
#
# # remove line endings
# tr -d "\n" < grub2_kernelopts.txt > grub2_kernelopts.sh
# cat grub2_kernelopts.sh
grub2-editenv - set " kernelopts=root=/dev/mapper/rl-root ro crashkernel=auto resume=/dev/mapper/rl-swap rd.lvm.lv=rl/root rd.lvm.lv=rl/swap console=tty0 console=ttyS0,115200"
#
# # update kernelopts
# bash grub2_kernelopts.sh
#
vm console
did not appear to work. And then more time to discover how to correct the omission.