[libvirt] [PATCH v2 2/2] domain_conf: add "default" to list of valid spice channels

Alon Levy alevy at redhat.com
Tue May 8 13:00:29 UTC 2012


qemu's behavior in this case is to change the spice server behavior to
require secure connection to any channel not otherwise specified as
being in plaintext mode. libvirt doesn't currently allow requesting this
(via plaintext-channel=<channel name>).

RHBZ: 819499

Signed-off-by: Alon Levy <alevy at redhat.com>
---
 docs/formatdomain.html.in                               |    5 +++--
 docs/schemas/domaincommon.rng                           |    1 +
 src/conf/domain_conf.c                                  |    1 +
 src/conf/domain_conf.h                                  |    1 +
 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args |    2 +-
 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml  |    1 +
 6 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 0525577..9758f73 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2940,8 +2940,9 @@ qemu-kvm -net nic,model=? /dev/null
               <code>inputs</code>, <code>cursor</code>,
               <code>playback</code>, <code>record</code>;
               <span class="since">since
-              0.8.8</span>: <code>smartcard</code> and <span class="since">
-              since 0.9.12</span> <code>usbredir</code>.
+              0.8.8</span>: <code>smartcard</code>, <span class="since">
+              since 0.9.12</span> <code>usbredir</code> and
+              <code>default</code>.
             </p>
             <pre>
   <graphics type='spice' port='-1' tlsPort='-1' autoport='yes'>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 77f2f6a..dec958d 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1788,6 +1788,7 @@
                     <value>record</value>
                     <value>smartcard</value>
                     <value>usbredir</value>
+                    <value>default</value>
                   </choice>
                 </attribute>
                 <attribute name="mode">
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 10b023e..1c9a95d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -422,6 +422,7 @@ VIR_ENUM_IMPL(virDomainGraphicsAuthConnected,
 
 VIR_ENUM_IMPL(virDomainGraphicsSpiceChannelName,
               VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_LAST,
+              "default",
               "main",
               "display",
               "inputs",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 6581fea..609fe45 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1090,6 +1090,7 @@ struct _virDomainGraphicsAuthDef {
 };
 
 enum virDomainGraphicsSpiceChannelName {
+    VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_DEFAULT,
     VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_MAIN,
     VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_DISPLAY,
     VIR_DOMAIN_GRAPHICS_SPICE_CHANNEL_INPUT,
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
index c9fdb99..698e39c 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
@@ -2,7 +2,7 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \
 /usr/bin/qemu -S -M pc -m 214 -smp 1 -nodefaults -monitor \
 unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda \
 /dev/HostVG/QEMUGuest1 -usb -spice port=5903,tls-port=5904,addr=127.0.0.1,\
-x509-dir=/etc/pki/libvirt-spice,tls-channel=main,plaintext-channel=inputs,\
+x509-dir=/etc/pki/libvirt-spice,tls-channel=default,tls-channel=main,plaintext-channel=inputs,\
 image-compression=auto_glz,jpeg-wan-compression=auto,zlib-glz-wan-compression=auto,\
 playback-compression=on,streaming-video=filter,disable-copy-paste -vga \
 qxl -global qxl.vram_size=18874368 -device qxl,id=video1,vram_size=33554432,bus=pci.0,addr=0x4 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
index 8930b60..f995317 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
@@ -24,6 +24,7 @@
     <input type='mouse' bus='ps2'/>
     <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'>
       <listen type='address' address='127.0.0.1'/>
+      <channel name='default' mode='secure'/>
       <channel name='main' mode='secure'/>
       <channel name='inputs' mode='insecure'/>
       <image compression='auto_glz'/>
-- 
1.7.10.1




More information about the libvir-list mailing list