mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
conf: introduce 'wait' attribute for VNC
Introduce an optional 'wait' attribute for 'VNC'. When set to 'yes', VM should only boot upon the initiation of a VNC connection. Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
1 parent
ec501bdc5e
commit
c8bffda588
3 files changed
+14
No files matched your search
@@ -11940,6 +11940,10 @@ virDomainGraphicsDefParseXMLVNC(virDomainGraphicsDef *def,
|
||||
|
||||
def->data.vnc.keymap = virXMLPropString(node, "keymap");
|
||||
|
||||
if (virXMLPropTristateBool(node, "wait", VIR_XML_PROP_NONE,
|
||||
&def->data.vnc.wait) < 0)
|
||||
return -1;
|
||||
|
||||
ctxt->node = node;
|
||||
audioNode = virXPathNode("./audio", ctxt);
|
||||
if (audioNode) {
|
||||
@@ -27213,6 +27217,10 @@ virDomainGraphicsDefFormatVNC(virBuffer *attrBuf,
|
||||
virBufferAsprintf(attrBuf, " websocketGenerated='%s'",
|
||||
def->data.vnc.websocketGenerated ? "yes" : "no");
|
||||
|
||||
if (def->data.vnc.wait != VIR_TRISTATE_BOOL_ABSENT)
|
||||
virBufferAsprintf(attrBuf, " wait='%s'",
|
||||
virTristateBoolTypeToString(def->data.vnc.wait));
|
||||
|
||||
virDomainGraphicsListenDefFormatAddr(attrBuf, glisten, flags);
|
||||
break;
|
||||
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE:
|
||||
|
||||
@@ -2048,6 +2048,7 @@ struct _virDomainGraphicsDef {
|
||||
virDomainGraphicsVNCSharePolicy sharePolicy;
|
||||
virTristateBool powerControl;
|
||||
unsigned int audioId;
|
||||
virTristateBool wait;
|
||||
} vnc;
|
||||
struct {
|
||||
char *display;
|
||||
|
||||
@@ -4358,6 +4358,11 @@
|
||||
<ref name="virYesNo"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="wait">
|
||||
<ref name="virYesNo"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</group>
|
||||
<group>
|
||||
<optional>
|
||||
|
||||
Reference in new issue
Block a user