From 88c07b328272ce7eb4688b4165ca9844b6ea6a88 Mon Sep 17 00:00:00 2001 From: Hans Rosenfeld Date: Tue, 14 Jul 2026 19:11:04 +0200 Subject: [PATCH] brand/bhyve: add virtio-consoleN attribute This attribute allow configuration of virtio-console ports, which are really just serial ports based on virtio. There is currently no support for console virtio-console. --- src/brand/bhyve/boot.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/brand/bhyve/boot.py b/src/brand/bhyve/boot.py index f289dd429..cca83e0c9 100755 --- a/src/brand/bhyve/boot.py +++ b/src/brand/bhyve/boot.py @@ -124,6 +124,7 @@ RNG_SLOT = 10 VIRTFS_SLOT = 11 NET_SLOT2 = 12 +CONSOLE_SLOT = 17 CINIT_SLOT = 29 VNC_SLOT = 30 LPC_SLOT_WIN = 31 @@ -460,6 +461,13 @@ def apply_bootnext(v): args.extend(['-l', 'com1,{0}'.format(opts['console'])]) +# virtio-console/serial devices + +for i, v in z.build_devlist('virtio-console', 4): + args.extend([ + '-s', '{0}:{1},virtio-console,{2}'.format(CONSOLE_SLOT, i, v) + ]) + # CDROM for i, v in z.build_devlist('cdrom', 8):