Sample Header Ad - 728x90

How to enable the second console to a FreeBSD guest running in bhyve?

8 votes
1 answer
1105 views
# Background I'm running FreeBSD 12.1-RELEASE as a host for [bhyve](https://www.freebsd.org/cgi/man.cgi?bhyve) virtual machines. I have a FreeBSD 12.1-RELEASE guest running inside a VM. I would like to have two TTY-class devices configured for it. According to the manual page, in order to start the VM with two TTY-class devices I have to start bhyve with command-line options similar to those: -l com1,/dev/nmdm0B -l com2,/dev/nmdm1B. Then I should be able to connect to the guest via those two [nullmodem terminals](https://www.freebsd.org/cgi/man.cgi?nmdm) with cu -l /dev/nmdm0A and cu -l /dev/nmdm1A. # Problem The first command works as expected: cu -l /dev/nmdm0A shows me the main console of the guest. The second command, however, attaches to the guest, but shows nothing. I would expect to show me a login prompt as if switched to another TTY. *What am I missing?* --- ## Additional details - The guest is a fresh installation of FreeBSD. - The output of dmesg | grep uart on the guest is as follows:
uart0:  port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
    uart0: console (115200,n,8,1)
    uart1:  port 0x2f8-0x2ff irq 3 on acpi0
- I've tried setting hint.uart.1.flags first to 0x10 and then to 0x80 (although this one is for kernel debuggers from what I understand from [uart(4)](https://www.freebsd.org/cgi/man.cgi?uart)) and rebooted after each change. It didn't work. ### References - https://bsdjhb.blogspot.com/2018/10/using-bhyve-for-freebsd-development.html - https://gist.github.com/landonf/d00a15ede7d5ccb0e371
Asked by Mateusz Piotrowski (4983 rep)
Jun 26, 2020, 03:39 PM
Last activity: Oct 1, 2024, 11:44 AM