提交 f037a955 编写于 作者: P Pavel Hrdina

docs: rewrite graphics XML documentation

This cleanups the documentation, reformat some of the paragraphs to use
<p> instead of </br> and rewrites the listen part to be more extendable.
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
上级 71ea1085
...@@ -4943,108 +4943,113 @@ qemu-kvm -net nic,model=? /dev/null ...@@ -4943,108 +4943,113 @@ qemu-kvm -net nic,model=? /dev/null
<dl> <dl>
<dt><code>graphics</code></dt> <dt><code>graphics</code></dt>
<dd>The <code>graphics</code> element has a mandatory <code>type</code> <dd>
attribute which takes the value "sdl", "vnc", "spice", "rdp" or <p>
"desktop": The <code>graphics</code> element has a mandatory <code>type</code>
attribute which takes the value <code>sdl</code>, <code>vnc</code>,
<code>spice</code>, <code>rdp</code> or <code>desktop</code>:
</p>
<dl> <dl>
<dt><code>"sdl"</code></dt> <dt><code>"sdl"</code></dt>
<dd> <dd>
This displays a window on the host desktop, it can take 3 <p>
optional arguments: a <code>display</code> attribute for This displays a window on the host desktop, it can take 3 optional
the display to use, an <code>xauth</code> attribute for arguments: a <code>display</code> attribute for the display to use,
the authentication identifier, and an an <code>xauth</code> attribute for the authentication identifier,
optional <code>fullscreen</code> attribute accepting and an optional <code>fullscreen</code> attribute accepting values
values 'yes' or 'no'. <code>yes</code> or <code>no</code>.
</p>
</dd> </dd>
<dt><code>"vnc"</code></dt> <dt><code>"vnc"</code></dt>
<dd> <dd>
Starts a VNC server. The <code>port</code> attribute <p>
specifies the TCP port number (with -1 as legacy syntax Starts a VNC server. The <code>port</code> attribute specifies
indicating that it should be the TCP port number (with -1 as legacy syntax indicating that it
auto-allocated). The <code>autoport</code> attribute is should be auto-allocated). The <code>autoport</code> attribute is
the new preferred syntax for indicating autoallocation of the new preferred syntax for indicating auto-allocation of the TCP
the TCP port to use. The <code>listen</code> attribute is port to use. The <code>listen</code> attribute is an IP address
an IP address for the server to listen for the server to listen on. The <code>passwd</code> attribute
on. The <code>passwd</code> attribute provides a VNC provides a VNC password in clear text. The <code>keymap</code>
password in clear text. The <code>keymap</code> attribute attribute specifies the keymap to use. It is possible to set
specifies the keymap to use. It is possible to set a limit a limit on the validity of the password by giving an timestamp
on the validity of the password be giving an <code>passwdValidTo='2010-04-09T15:51:00'</code> assumed to be
timestamp <code>passwdValidTo='2010-04-09T15:51:00'</code> in UTC. The <code>connected</code> attribute allows control of
assumed to be in UTC. The <code>connected</code> attribute connected client during password changes. VNC accepts
allows control of connected client during password changes. <code>keep</code> value only <span class="since">since 0.9.3</span>.
VNC accepts <code>keep</code> value only. NB, this may not be supported by all hypervisors.
<span class="since">since 0.9.3</span> </p>
NB, this may not be supported by all hypervisors.<br/> <p>
The optional <code>sharePolicy</code> attribute specifies vnc server The optional <code>sharePolicy</code> attribute specifies vnc
display sharing policy. "allow-exclusive" allows clients to ask server display sharing policy. <code>allow-exclusive</code> allows
for exclusive access by dropping other connections. Connecting clients to ask for exclusive access by dropping other connections.
multiple clients in parallel requires all clients asking for a Connecting multiple clients in parallel requires all clients asking
shared session (vncviewer: -Shared switch). This is the default for a shared session (vncviewer: -Shared switch). This is
value. "force-shared" disables exclusive client access, every the default value. <code>force-shared</code> disables exclusive
connection has to specify -Shared switch for vncviewer. "ignore" client access, every connection has to specify -Shared switch for
welcomes every connection unconditionally vncviewer. <code>ignore</code> welcomes every connection
<span class="since">since 1.0.6</span>. <br/> <br/> unconditionally <span class="since">since 1.0.6</span>.
Rather than using listen/port, QEMU supports a </p>
<code>socket</code> attribute for listening on a unix <p>
domain socket path.<span class="since">Since 0.8.8</span> Rather than using listen/port, QEMU supports a <code>socket</code>
attribute for listening on a unix domain socket path
For VNC WebSocket functionality, <code>websocket</code> <span class="since">Since 0.8.8</span>.
attribute may be used to specify port to listen on (with </p>
-1 meaning auto-allocation and <code>autoport</code> <p>
having no effect due to security reasons). For VNC WebSocket functionality, <code>websocket</code> attribute
<span class="since">Since 1.0.6</span> may be used to specify port to listen on (with -1 meaning
auto-allocation and <code>autoport</code> having no effect due to
security reasons) <span class="since">Since 1.0.6</span>.
</p>
</dd> </dd>
<dt><code>"spice"</code></dt> <dt><code>"spice"</code> <span class="since">Since 0.8.6</span></dt>
<dd> <dd>
<p> <p>
Starts a SPICE server. The <code>port</code> attribute Starts a SPICE server. The <code>port</code> attribute specifies
specifies the TCP port number (with -1 as legacy syntax the TCP port number (with -1 as legacy syntax indicating that it
indicating that it should be auto-allocated), should be auto-allocated), while <code>tlsPort</code> gives
while <code>tlsPort</code> gives an alternative secure an alternative secure port number. The <code>autoport</code>
port number. The <code>autoport</code> attribute is the attribute is the new preferred syntax for indicating
new preferred syntax for indicating autoallocation of auto-allocation of needed port numbers. The <code>listen</code>
needed port numbers. The <code>listen</code> attribute is attribute is an IP address for the server to listen on.
an IP address for the server to listen The <code>passwd</code> attribute provides a SPICE password in
on. The <code>passwd</code> attribute provides a SPICE clear text. The <code>keymap</code> attribute specifies the keymap
password in clear text. The <code>keymap</code> to use. It is possible to set a limit on the validity of
attribute specifies the keymap to use. It is possible to the password by giving an timestamp
set a limit on the validity of the password be giving an <code>passwdValidTo='2010-04-09T15:51:00'</code> assumed to be in
timestamp <code>passwdValidTo='2010-04-09T15:51:00'</code> UTC.
assumed to be in UTC. The <code>connected</code> attribute </p>
allows control of connected client during password changes. <p>
SPICE accepts <code>keep</code> to keep client connected, The <code>connected</code> attribute allows control of connected
<code>disconnect</code> to disconnect client and client during password changes. SPICE accepts <code>keep</code> to
<code>fail</code> to fail changing password. keep client connected, <code>disconnect</code> to disconnect client
and <code>fail</code> to fail changing password . NB, this may not
be supported by all hypervisors.
<span class="since">Since 0.9.3</span> <span class="since">Since 0.9.3</span>
NB, this may not be supported by all hypervisors. </p>
<span class="since">"spice" since 0.8.6</span>. <p>
The <code>defaultMode</code> attribute sets the default channel The <code>defaultMode</code> attribute sets the default channel
security policy, valid values are <code>secure</code>, security policy, valid values are <code>secure</code>,
<code>insecure</code> and the default <code>any</code> <code>insecure</code> and the default <code>any</code> (which is
(which is secure if possible, but falls back to insecure secure if possible, but falls back to insecure rather than erroring
rather than erroring out if no secure path is out if no secure path is available).
available). <span class="since">"defaultMode" since <span class="since">Since 0.9.12</span>
0.9.12</span>. </p>
</p> <p>
<p> When SPICE has both a normal and TLS secured TCP port configured,
When SPICE has both a normal and TLS secured TCP port it can be desirable to restrict what channels can be run on each
configured, it can be desirable to restrict what port. This is achieved by adding one or more <code>&lt;channel&gt;
channels can be run on each port. This is achieved by </code> elements inside the main <code>&lt;graphics&gt;</code>
adding one or more &lt;channel&gt; elements inside the element and setting the <code>mode</code> attribute to either
main &lt;graphics&gt; element and setting the <code>mode</code> <code>secure</code> or <code>insecure</code>. Setting the mode
attribute to either <code>secure</code> or <code>insecure</code>. attribute overrides the default value as set by
Setting the mode attribute overrides the default value as set the <code>defaultMode</code> attribute. (Note that specifying
by the <code>defaultMode</code> attribute. (Note that specifying
<code>any</code> as mode discards the entry as the channel would <code>any</code> as mode discards the entry as the channel would
inherit the default mode anyways) inherit the default mode anyways.) Valid channel names include
Valid channel names <code>main</code>, <code>display</code>, <code>inputs</code>,
include <code>main</code>, <code>display</code>, <code>cursor</code>, <code>playback</code>, <code>record</code>
<code>inputs</code>, <code>cursor</code>,
<code>playback</code>, <code>record</code>
(all <span class="since"> since 0.8.6</span>); (all <span class="since"> since 0.8.6</span>);
<code>smartcard</code> (<span class="since">since <code>smartcard</code> (<span class="since">since 0.8.8</span>);
0.8.8</span>); and <code>usbredir</code> and <code>usbredir</code> (<span class="since">since 0.9.12</span>).
(<span class="since">since 0.9.12</span>).
</p> </p>
<pre> <pre>
&lt;graphics type='spice' port='-1' tlsPort='-1' autoport='yes'&gt; &lt;graphics type='spice' port='-1' tlsPort='-1' autoport='yes'&gt;
...@@ -5058,131 +5063,113 @@ qemu-kvm -net nic,model=? /dev/null ...@@ -5058,131 +5063,113 @@ qemu-kvm -net nic,model=? /dev/null
&lt;gl enable='yes'/&gt; &lt;gl enable='yes'/&gt;
&lt;/graphics&gt;</pre> &lt;/graphics&gt;</pre>
<p> <p>
Spice supports variable compression settings for audio, Spice supports variable compression settings for audio, images and
images and streaming, <span class="since">since streaming. These settings are accessible via the <code>compression
0.9.1</span>. These settings are accessible via </code> attribute in all following elements: <code>image</code> to
the <code>compression</code> attribute in all following set image compression (accepts <code>auto_glz</code>,
elements: <code>image</code> to set image compression <code>auto_lz</code>, <code>quic</code>, <code>glz</code>,
(accepts <code>auto_glz</code>, <code>auto_lz</code>, <code>lz</code>, <code>off</code>), <code>jpeg</code> for JPEG
<code>quic</code>, <code>glz</code>, <code>lz</code>, compression for images over wan (accepts <code>auto</code>,
<code>off</code>), <code>jpeg</code> for JPEG <code>never</code>, <code>always</code>), <code>zlib</code> for
compression for images over wan configuring wan image compression (accepts <code>auto</code>,
(accepts <code>auto</code>, <code>never</code>, <code>never</code>, <code>always</code>) and <code>playback</code>
<code>always</code>), <code>zlib</code> for configuring for enabling audio stream compression (accepts <code>on</code> or
wan image compression (accepts <code>auto</code>, <code>off</code>). <span class="since">Since 0.9.1</span>
<code>never</code>, <code>always</code>)
and <code>playback</code> for enabling audio stream
compression (accepts <code>on</code> or <code>off</code>).
</p> </p>
<p> <p>
Streaming mode is set by the <code>streaming</code> Streaming mode is set by the <code>streaming</code> element,
element, settings its <code>mode</code> attribute to one settings its <code>mode</code> attribute to one of
of <code>filter</code>, <code>all</code> <code>filter</code>, <code>all</code> or <code>off</code>.
or <code>off</code>, <span class="since">since 0.9.2</span>. <span class="since">Since 0.9.2</span>
</p> </p>
<p> <p>
Copy &amp; Paste functionality (via Spice agent) is set Copy &amp; Paste functionality (via Spice agent) is set by the
by the <code>clipboard</code> element. It is enabled by <code>clipboard</code> element. It is enabled by default, and can
default, and can be disabled by setting be disabled by setting the <code>copypaste</code> property to
the <code>copypaste</code> property <code>no</code>. <span class="since">Since 0.9.3</span>
to <code>no</code>, <span class="since">since
0.9.3</span>.
</p> </p>
<p> <p>
Mouse mode is set by the <code>mouse</code> element, Mouse mode is set by the <code>mouse</code> element, setting its
setting its <code>mode</code> attribute to one of <code>mode</code> attribute to one of <code>server</code> or
<code>server</code> or <code>client</code> , <code>client</code>. If no mode is specified, the qemu default will
<span class="since">since 0.9.11</span>. If no mode is be used (client mode). <span class="since">Since 0.9.11</span>
specified, the qemu default will be used (client mode).
</p> </p>
<p> <p>
File transfer functionality (via Spice agent) is set using the File transfer functionality (via Spice agent) is set using the
<code>filetransfer</code> element. <code>filetransfer</code> element. It is enabled by default, and
It is enabled by default, and can be disabled by setting the can be disabled by setting the <code>enable</code> property to
<code>enable</code> property to <code>no</code> , <code>no</code>. <span class="since">Since 1.2.2</span>
since <span class="since">since 1.2.2</span>.
</p> </p>
<p> <p>
Spice may provide accelerated server-side rendering with Spice may provide accelerated server-side rendering with OpenGL.
OpenGL. You can enable or disable OpenGL support explicitly with You can enable or disable OpenGL support explicitly with
the <code>gl</code> element, by setting the the <code>gl</code> element, by setting the <code>enable</code>
<code>enable</code> property. (QEMU property. (QEMU only, <span class="since">since 1.3.2</span>).
only, <span class="since">since 1.3.2</span>).
</p> </p>
</dd> </dd>
<dt><code>"rdp"</code></dt> <dt><code>"rdp"</code></dt>
<dd> <dd>
Starts a RDP server. The <code>port</code> attribute <p>
specifies the TCP port number (with -1 as legacy syntax Starts a RDP server. The <code>port</code> attribute specifies the
indicating that it should be TCP port number (with -1 as legacy syntax indicating that it should
auto-allocated). The <code>autoport</code> attribute is be auto-allocated). The <code>autoport</code> attribute is the new
the new preferred syntax for indicating autoallocation of preferred syntax for indicating auto-allocation of the TCP port to
the TCP port to use. The <code>replaceUser</code> use. The <code>replaceUser</code> attribute is a boolean deciding
attribute is a boolean deciding whether multiple whether multiple simultaneous connections to the VM are permitted.
simultaneous connections to the VM are permitted. The <code>multiUser</code> attribute is a boolean deciding whether
The <code>multiUser</code> attribute is a boolean deciding the existing connection must be dropped and a new connection must
whether the existing connection must be dropped and a new be established by the VRDP server, when a new client connects in
connection must be established by the VRDP server, when a single connection mode.
new client connects in single connection mode. </p>
</dd> </dd>
<dt><code>"desktop"</code></dt> <dt><code>"desktop"</code></dt>
<dd> <dd>
This value is reserved for VirtualBox domains for the <p>
moment. It displays a window on the host desktop, This value is reserved for VirtualBox domains for the moment. It
similarly to "sdl", but using the VirtualBox viewer. Just displays a window on the host desktop, similarly to "sdl", but
like "sdl", it accepts the optional using the VirtualBox viewer. Just like "sdl", it accepts
attributes <code>display</code> the optional attributes <code>display</code> and
and <code>fullscreen</code>. <code>fullscreen</code>.
</p>
</dd> </dd>
</dl> </dl>
</dd> </dd>
</dl> </dl>
<p> <p>
Rather than putting the address information used to set up the Graphics device uses a <code>&lt;listen&gt;</code> to set up where
listening socket for graphics types <code>vnc</code> the device should listen for clients. It has a mandatory attribute
and <code>spice</code> in <code>type</code> which specifies the listen type. Only <code>vnc</code>,
the <code>&lt;graphics&gt;</code> <code>listen</code> attribute, <code>spice</code> and <code>rdp</code> supports <code>&lt;listen&gt;
a separate subelement of <code>&lt;graphics&gt;</code>, </code> element. <span class="since">Since 0.9.4</span>.
called <code>&lt;listen&gt;</code> can be specified (see the Available types are:
examples above)<span class="since">since
0.9.4</span>. <code>&lt;listen&gt;</code> accepts the following
attributes:
</p> </p>
<dl>
<dt><code>type</code></dt>
<dd>Set to either <code>address</code>
or <code>network</code>. This tells whether this listen
element is specifying the address to be used directly, or by
naming a network (which will then be used to determine an
appropriate address for listening).
</dd>
</dl>
<dl> <dl>
<dt><code>address</code></dt> <dt><code>address</code></dt>
<dd>if <code>type='address'</code>, the <code>address</code> <dd>
attribute will contain either an IP address or hostname (which <p>
will be resolved to an IP address via a DNS query) to listen Tells a graphics device to use an address specified in the
on. In the "live" XML of a running domain, this attribute will <code>address</code> attribute, which will contain either an IP address
be set to the IP address used for listening, even or hostname (which will be resolved to an IP address via a DNS query)
if <code>type='network'</code>. to listen on.
</p>
</dd> </dd>
</dl>
<dl>
<dt><code>network</code></dt> <dt><code>network</code></dt>
<dd>if <code>type='network'</code>, the <code>network</code> <dd>
attribute will contain the name of a network in libvirt's list <p>
of configured networks. The named network configuration will This is used to specify an existing network in the <code>network</code>
be examined to determine an appropriate listen address. For attribute from libvirt's list of configured networks. The named network
example, if the network has an IPv4 address in its configuration will be examined to determine an appropriate listen
configuration (e.g. if it has a forward type address and the address will be stored in live XML in <code>address
of <code>route</code>, <code>nat</code>, or no forward type </code> attribute. For example, if the network has an IPv4 address in
(isolated)), the first IPv4 address listed in the network's its configuration (e.g. if it has a forward type of <code>route</code>,
configuration will be used. If the network is describing a <code>nat</code>, or no forward type (isolated)), the first IPv4
host bridge, the first IPv4 address associated with that address listed in the network's configuration will be used.
bridge device will be used, and if the network is describing If the network is describing a host bridge, the first IPv4 address
one of the 'direct' (macvtap) modes, the first IPv4 address of associated with that bridge device will be used, and if the network is
the first forward dev will be used. describing one of the 'direct' (macvtap) modes, the first IPv4 address
of the first forward dev will be used.
</p>
</dd> </dd>
</dl> </dl>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册