]> git.ipfire.org Git - thirdparty/libvirt.git/commit
bhyve: support serial type 'tcp'
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Wed, 18 Jun 2025 17:07:49 +0000 (19:07 +0200)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Thu, 17 Jul 2025 17:29:10 +0000 (19:29 +0200)
commit8b7db74d4a166c9cfbd97918f660096a0f8f38cf
treea9bdcd8aa3818f4f819fbf0878fe3c538ca2051c
parent680ee0e7d18866c4f41774dd8368902470a14a07
bhyve: support serial type 'tcp'

In addition to the nmdm consoles, bhyve also supports a tcp console.
It's configured with:

 .. -l com1,tcp=127.0.0.1:12345

Then a user could connect to the guest console port 0 by making a tcp
connection to the host's 127.0.0.1:12345.

In the domain XML this configuration is represented as:

  <serial type='tcp'>
    <source mode='bind' host='127.0.0.1' service='12345'/>
    <target type='serial' port='0'/>
  </serial>

Also, update domain capabilities to include the TCP console support.
Unfortunately, there's no way to detect that from the bhyve binary
before trying to start a VM, so there's no capability probing for this
feature.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/bhyve/bhyve_capabilities.c
src/bhyve/bhyve_command.c
tests/bhyvexml2argvdata/bhyvexml2argv-serial-tcp.args [new file with mode: 0644]
tests/bhyvexml2argvdata/bhyvexml2argv-serial-tcp.ldargs [new file with mode: 0644]
tests/bhyvexml2argvdata/bhyvexml2argv-serial-tcp.xml [new file with mode: 0644]
tests/bhyvexml2argvtest.c
tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-tcp.xml [new file with mode: 0644]
tests/bhyvexml2xmltest.c
tests/domaincapsdata/bhyve_basic.x86_64.xml
tests/domaincapsdata/bhyve_fbuf.x86_64.xml
tests/domaincapsdata/bhyve_uefi.x86_64.xml