Hey,
Not a full review yet as I have only been looking at the doc so far.
On Mon, Feb 03, 2014 at 05:41:00PM +0100, Martin Kletzander wrote:
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
Notes:
This applies on top of "qemu: minor cleanups":
https://www.redhat.com/archives/libvir-list/2014-January/msg01584.html
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index fd02864..20ee61e 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4252,6 +4252,10 @@ qemu-kvm -net nic,model=? /dev/null
<source path='/dev/pts/3'/>
<target port='0'/>
</serial>
+ <serial type='spiceport'>
+ <source channel='org.qemu.console.serial.0'/>
+ <target port='0'/>
+ </serial>
<console type='pty'>
<source path='/dev/pts/4'/>
<target port='0'/>
@@ -4711,6 +4715,24 @@ qemu-kvm -net nic,model=? /dev/null
<pre>
...
<devices>
+ <serial type="spiceport">
+ <source channel="org.qemu.console.serial.0"/>
+ <target port="1"/>
+ </serial>
+ </devices>
+ ...</pre>
+
+ <h6><a name="elementsCharSpiceport">Spice
channel</a></h6>
+
+ <p>
+ The character device is accessible through spice connection
+ under a channel name specified in the <code>channel</code>
+ attribute. <span class="since">Since 1.2.2</span>
+ </p>
+
+<pre>
+ ...
+ <devices>
<serial type="unix">
<source mode="bind" path="/tmp/foo"/>
<target port="1"/>
This bit is wrong as the doc ends up as
* UNIX domain socket client/server
description
spiceport sample XML
* Spice channel
description
unix domain socket sample XML
Regarding the way it's exposed, you have chosen to go with
<devices>
<serial type="spiceport">
<source channel="org.qemu.console.serial.0"/>
<target port="1"/>
</serial>
</devices>
This exposes the 'org.qemu.console.serial.0' spiceport as a serial port in
the guest. This spiceport can then be used by client applications to
interact with the guest.
This is very similar to what is done for the spice agent channel (a virtio serial
port is made available in the guest and is used for client<->guest
communication). Wouldn't it be more consistent to use
<channel type="spiceport">
<target type="virtio" name="org.qemu.console.serial.0"/>
</channel>
here?
When I gave some thoughts about how to expose spiceport in libvirt, I got
confused as in addition to this guest<->spice client channel, spiceport is
much more generic and can also be used to create some host<->spice client
channels (eg forward a local host socket/... over to the client through
spice).
If we use <channel>, maybe this can be added later with
<channel type="spiceport">
<target type="host" name="org.qemu.console.serial.0"/>
<source ... />
</channel> ? (thinking out loud, and something which can be added when
there is need for it)
Christophe