QMP command add_client's schema: ## # @add_client: # # Allow client connections for VNC, Spice and socket based # character devices to be passed in to QEMU via SCM_RIGHTS. # # @protocol: protocol name. Valid names are "vnc", "spice", "@dbus-display" or # the name of a character device (eg. from -chardev id=XXXX) # # @fdname: file descriptor name previously passed via 'getfd' command # # @skipauth: whether to skip authentication. Only applies # to "vnc" and "spice" protocols # # @tls: whether to perform TLS. Only applies to the "spice" # protocol # # Returns: nothing on success. # # Since: 0.14 # # Example: # # -> { "execute": "add_client", "arguments": { "protocol": "vnc", # "fdname": "myclient" } } # <- { "return": {} } # ## { 'command': 'add_client', 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool', '*tls': 'bool' } }
Spot the design flaw! It's overloaded @protocol. Two issues. One, character device IDs "vnc", "spice", "@dbus-display" don't work here. If we ever add another protocol, we make another device ID not work. Perhaps this is why Marc-André chose "@dbus-display", which otherwise looks like a typo :) Two, introspection can't tell us what protocols are supported. As far as I can tell, libvirt does not use this with character devices. It does use the other three protocols. Are there any known uses with character devices? If not, any ideas why one would want to use the command with character devices?