vnc: add support for listen type 'socket'

VNC graphics already supports sockets but only via 'socket' attribute.
This patch coverts that attribute into listen type 'socket'.

For backward compatibility we need to handle listen type 'socket' and 'socket'
attribute properly to support old XMLs and new XMLs.  If both are provided they
have to match, if only one of them is provided we need to be able to parse that
configuration too.

To not break migration back to old libvirt if the socket is provided by user we
need to generate migratable XML without the listen element and use only 'socket'
attribute.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina
2016-06-08 15:18:25 +02:00
parent b6465e1aa4
commit acc83afe33
27 changed files with 445 additions and 84 deletions

View File

@@ -5366,6 +5366,14 @@ qemu-kvm -net nic,model=? /dev/null
This listen type tells a graphics server to listen on unix socket.
Attribute <code>socket</code> contains a path to unix socket. If this
attribute is omitted libvirt will generate this path for you.
Supported by graphics type <code>vnc</code>.
</p>
<p>
For <code>vnc</code> graphics be backward compatible
the <code>socket</code> attribute of first <code>listen</code> element
is duplicated as <code>socket</code> attribute in <code>graphics</code>
element. If <code>graphics</code> element contains a <code>socket</code>
attribute all <code>listen</code> elements are ignored.
</p>
</dd>
</dl>