On Sun, Jul 13, 2025 at 04:22:05PM +0200, Roman Bogorodskiy wrote: > 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='connect' 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 <bogorods...@gmail.com> > --- > src/bhyve/bhyve_capabilities.c | 3 +- > src/bhyve/bhyve_command.c | 42 +++++++++++------ > .../bhyvexml2argv-serial-tcp.args | 12 +++++ > .../bhyvexml2argv-serial-tcp.ldargs | 4 ++ > .../bhyvexml2argv-serial-tcp.xml | 27 +++++++++++ > tests/bhyvexml2argvtest.c | 1 + > .../bhyvexml2xmlout-serial-tcp.xml | 46 +++++++++++++++++++ > tests/bhyvexml2xmltest.c | 1 + > tests/domaincapsdata/bhyve_basic.x86_64.xml | 1 + > tests/domaincapsdata/bhyve_fbuf.x86_64.xml | 1 + > tests/domaincapsdata/bhyve_uefi.x86_64.xml | 1 + > 11 files changed, 123 insertions(+), 16 deletions(-) > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-serial-tcp.args > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-serial-tcp.ldargs > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-serial-tcp.xml > create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-tcp.xml
Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> This would benefit from a followup patch that extends bhyveDomainDeviceDefValidate to reject unsupported configs. eg anything that isn't 'tcp' and 'nmdm', as well as rejecting 'listen = true' for 'tcp' With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|