Date: Fri, 14 Feb 2025 16:55:23 -0500 From: Petru Garstea <peter.garshtja@ambient-md.com> To: Michael Gmelin <grembo@freebsd.org> Cc: freebsd-virtualization@freebsd.org Subject: Re: bhyve vm and virtio-console Message-ID: <5e1c08ca-4175-4a85-bc07-3ca73406454a@ambient-md.com> In-Reply-To: <20250214205752.6a12dbb4.grembo@freebsd.org> References: <2a0e1b92-4d63-4061-bc37-c5e72b8ef0ed@ambient-md.com> <20250214205752.6a12dbb4.grembo@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------x6vcrPSs0YHO7KlxFzDKehy3 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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<peter.garshtja@ambient-md.com> 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 > --------------x6vcrPSs0YHO7KlxFzDKehy3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>I tried with the following command, and got the same result.<br> </p> <p><b>/usr/sbin/bhyve -H -P -A -c 1 -m 1500M \<br> -s 0,hostbridge \ <br> -s 6,virtio-console,0=/tmp/vtcon.0 \<br> -s 31,lpc \<br> -l bootrom,/tmp/BHYVE_UEFI.fd \<br> -s 1,virtio-blk,/tmp/fbsd.img \<br> -s 2,virtio-net,tap0 \<br> tmp</b></p> <p><br> I also able to connect but the bidirectional connection is not happening <br> </p> <p><b>socat - UNIX-CONNECT:/tmp/vtcon.0<br> ls<br> </b><br> PS: if I use null modem emulation instead virtio-console, then connecting with cu is not an issue.<br> <br> any ideas ?<br> <br> Thanks<br> <br> On 2/14/25 14:57, Michael Gmelin wrote:</p> <blockquote type="cite" cite="mid:20250214205752.6a12dbb4.grembo@freebsd.org"> <pre wrap="" class="moz-quote-pre"> On Fri, 14 Feb 2025 14:21:07 -0500 Petru Garstea <a class="moz-txt-link-rfc2396E" href="mailto:peter.garshtja@ambient-md.com"><peter.garshtja@ambient-md.com></a> wrote: </pre> <blockquote type="cite"> <pre wrap="" class="moz-quote-pre">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 ? </pre> </blockquote> <pre wrap="" class="moz-quote-pre"> 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 </pre> </blockquote> </body> </html> --------------x6vcrPSs0YHO7KlxFzDKehy3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5e1c08ca-4175-4a85-bc07-3ca73406454a>