qemu: Improve handling of channels when generating SPICE command line

Improve error reporting and generating of SPICE command line arguments
according to the need to enable TLS. If TLS is disabled, there's no need
to pass the certificate dir to qemu.

This patch resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=953126
This commit is contained in:
Peter Krempa
2013-04-24 14:37:57 +02:00
parent 7b4a630484
commit 20cb7f3a41
3 changed files with 40 additions and 9 deletions
@@ -21,7 +21,7 @@ isa-serial,chardev=charserial0,id=serial0 -chardev \
spicevmc,id=charchannel0,name=vdagent -device \
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 \
-device usb-tablet,id=input0 -spice \
port=0,addr=0.0.0.0,x509-dir=/etc/pki/libvirt-spice -device \
port=0,addr=0.0.0.0 -device \
intel-hda,id=sound0,bus=pci.0,addr=0x4 -device \
hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device \
usb-host,hostbus=14,hostaddr=6,id=hostdev0 -device \
@@ -10,6 +10,6 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=spice \
-device rtl8139,vlan=0,id=net0,mac=52:54:00:71:70:89,bus=pci.0,addr=0x7 \
-net tap,script=/etc/qemu-ifup,vlan=0,name=hostnet0 -serial pty \
-device usb-tablet,id=input0 \
-spice port=5900,x509-dir=/etc/pki/libvirt-spice -vga std \
-spice port=5900 -vga std \
-device AC97,id=sound0,bus=pci.0,addr=0x3 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5