I tried with the following command, and got the same result.

*/usr/sbin/bhyve -H -P -A -c 1 -m 1500M \
-s 0,hostbridge \
-s 6,virtio-console,0=/tmp/vtcon.0 \
-s 31,lpc \
-l bootrom,/tmp/BHYVE_UEFI.fd \
-s 1,virtio-blk,/tmp/fbsd.img \
-s 2,virtio-net,tap0 \
tmp*


I also able to connect but the bidirectional connection is not happening

*socat - UNIX-CONNECT:/tmp/vtcon.0
ls
*
PS: if I use null modem emulation instead virtio-console, then connecting with cu is not an issue.

any ideas ?

Thanks

On 2/14/25 14:57, Michael Gmelin wrote:


On Fri, 14 Feb 2025 14:21:07 -0500
Petru Garstea<[email protected]> wrote:

Hi,
I am trying to configure bhyve vm with support of virtio-console, the
following option is added to bhyve command line

*-s 3,virtio-console,port1=/test/console.sock

*However when trying to connect to socket with socat trere are no
input/ouptut is observed.

Has virtio-console ever worked ?

Yes it works, I just tried it using sysutils/vm-bhyve (just add
virt_console0="Yes" to the configuration file).

Based on the logs, these device settings are used by it:

     bhyve devices:
       -s 0,hostbridge \
       -s 31,lpc \
       -s 4:0,virtio-blk,/dev/zvol/zroot/vms/freebsd14-test/disk0 \
       -s 5:0,virtio-net,tap0,mac=58:9c:fc:aa:aa:aa \
       -s 6:0,virtio-console,0=/vms/freebsd14-test/vtcon.0

I could connect to /vms/freebsd14-test/vtcon.0 using socat:

     socat - UNIX-CONNECT:/vms/freebsd14-test/vtcon.0

Inside the vm it's /dev/vtcon/0.

-m

Reply via email to