``autoport`` having no effect due to security reasons) :since:`Since
1.0.6` .
+ For VNC, the ``powerControl`` attribute can be used to enable VM shutdown,
+ reboot and reset power control features for the VNC client. This is
+ appropriate if the authenticated VNC client user already has administrator
+ privileges in the guest :since:`Since 7.1.0`.
+
Although VNC doesn't support OpenGL natively, it can be paired with
graphics type ``egl-headless`` (see below) which will instruct QEMU to
open and use drm nodes for OpenGL rendering.
g_autofree char *websocketGenerated = virXMLPropString(node, "websocketGenerated");
g_autofree char *sharePolicy = virXMLPropString(node, "sharePolicy");
g_autofree char *autoport = virXMLPropString(node, "autoport");
+ g_autofree char *powerControl = virXMLPropString(node, "powerControl");
if (virDomainGraphicsListensParseXML(def, node, ctxt, flags) < 0)
return -1;
}
}
+ if (powerControl) {
+ int powerControlVal = virTristateBoolTypeFromString(powerControl);
+ if (powerControlVal < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("cannot parse vnc power control '%s'"), powerControl);
+ return -1;
+ }
+ def->data.vnc.powerControl = powerControlVal;
+ }
+
def->data.vnc.keymap = virXMLPropString(node, "keymap");
if (virDomainGraphicsAuthDefParseXML(node, &def->data.vnc.auth,
virDomainGraphicsVNCSharePolicyTypeToString(
def->data.vnc.sharePolicy));
+ if (def->data.vnc.powerControl)
+ virBufferAsprintf(buf, " powerControl='%s'",
+ virTristateBoolTypeToString(def->data.vnc.powerControl));
+
virDomainGraphicsAuthDefFormatAttr(buf, &def->data.vnc.auth, flags);
break;