Martin Kletzander wrote: > On Wed, Nov 19, 2025 at 06:54:26PM +0100, Roman Bogorodskiy wrote: > > Bhyve supports the 'wait' option for the VNC device configuration. > > When enabled, VM boots only upon a VNC connection. > > > > Sample device configuration looks like this: > > > > -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait > > > > Signed-off-by: Roman Bogorodskiy <[email protected]> > > --- > > src/bhyve/bhyve_command.c | 3 ++ > > .../bhyvexml2argv-vnc-wait-no.args | 13 ++++++ > > .../bhyvexml2argv-vnc-wait-no.ldargs | 1 + > > .../bhyvexml2argv-vnc-wait-no.xml | 26 +++++++++++ > > .../bhyvexml2argv-vnc-wait.args | 13 ++++++ > > .../bhyvexml2argv-vnc-wait.ldargs | 1 + > > .../bhyvexml2argv-vnc-wait.xml | 26 +++++++++++ > > tests/bhyvexml2argvtest.c | 2 + > > .../bhyvexml2xmlout-vnc-wait-no.xml | 44 +++++++++++++++++++ > > .../bhyvexml2xmlout-vnc-wait.xml | 44 +++++++++++++++++++ > > tests/bhyvexml2xmltest.c | 2 + > > 11 files changed, 175 insertions(+) > > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-wait-no.args > > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-wait-no.ldargs > > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-wait-no.xml > > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-wait.args > > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-wait.ldargs > > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-wait.xml > > create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-wait-no.xml > > create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-wait.xml > > > > diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c > > index 8bfd5a6f93..057715102e 100644 > > --- a/src/bhyve/bhyve_command.c > > +++ b/src/bhyve/bhyve_command.c > > @@ -651,6 +651,9 @@ bhyveBuildGraphicsArgStr(const virDomainDef *def, > > virBufferAsprintf(&opt, ",vga=%s", > > > > virDomainVideoVGAConfTypeToString(video->driver->vgaconf)); > > > > + if (graphics->data.vnc.wait) > > If you agree with my suggestion from PATCH 1/2, this should be changed > to: > > `if (graphics->data.vnc.wait != VIR_TRISTATE_BOOL_YES)`
I've pushed with your suggestions incorporated and ^ this changed to " == VIR_TRISTATE_BOOL_YES". Thanks for review! > But if you don't (which also makes sense since bhyve only has a way to > enable the wait and not explicitly disable it) then PATCH 1/2 needs an > adjustment. > > To elaborate on this a bit, using any tristate gives us the ability to > keep some setting around even when it is the default, just in case it > changes in the future or the default is different in some other driver. > > Since both of the scenarios are highly unlikely with respect to VNC > server's `wait` parameter, I guess I am fine with both. > > Either way, if adjusted along with tests: > > Reviewed-by: Martin Kletzander <[email protected]> > > > diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-wait-no.xml > > b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-wait-no.xml > > new file mode 100644 > > index 0000000000..58e71282e7 > > --- /dev/null > > +++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-wait-no.xml > > @@ -0,0 +1,44 @@ > > [...] > > > + <graphics type='vnc' port='5904' autoport='no' listen='127.0.0.1'> > > See ^^ =)
