Bug 913244

Summary: Create valid command line for QEMU with only SPICE TLS autoport specified
Product: Red Hat Enterprise Linux 6 Reporter: Martin Kletzander <mkletzan>
Component: libvirtAssignee: Martin Kletzander <mkletzan>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.4CC: acathrow, cpelland, cwei, dallan, dyuan, juzhang, mzhan, vfeenstr, ydu, zpeng
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.10.2-19.el6 Doc Type: Bug Fix
Doc Text:
Cause: The only way to request autoport only for TLS SPICE port without any normal port didn't work and guest with such specification couldn't start. Consequence: VDSM was very sad. Fix: We fixed parsing graphics parameters and formatting them for qemu with SPICE and only TLS. Result: VDSM is happy.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 08:46:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 905930, 913624    

Description Martin Kletzander 2013-02-20 17:28:04 UTC
Description of problem:
When autoport and port aren't specified, but tlsPort is set to '-1', the tls-port parameter specified in QEMU command-line is set to '1' instead of valid port. 

Version-Release number of selected component (if applicable):
libvirt-0.10.2

How reproducible:
100%

Steps to Reproduce:
1. create a domain with:
<graphics type='spice' tlsPort='-1' autoport='no' listen='0' keymap='en-us'>
2. try to start the domain
  
Actual results:
Guest will not start

Expected results:
Guest should start

Comment 4 zhe peng 2013-02-21 05:54:16 UTC
I can reproduce this with build:
libvirt-0.10.2-18.el6.x86_64

step:
 1.config tls env.
 2.edit guest xml:
 ....
<graphics type='spice' tlsPort='-1' autoport='no' listen='0' keymap='en-us'>
      <listen type='address' address='0'/>
    </graphics>
 ....
 3.start guest
 > virsh start $guest
error: Failed to start domain win2012
error: internal error Process exited while reading console log output: char device redirected to /dev/pts/2
((null):4157): Spice-Warning **: reds.c:3173:reds_init_socket: reds_init_socket: binding socket to 0:1 failed
failed to initialize spice server

Comment 14 zhe peng 2013-07-09 05:43:09 UTC
verify with build:
libvirt-0.10.2-19.el6.x86_64

step:
1.config tls env.
 2.edit guest xml:
 ....
<graphics type='spice' tlsPort='-1' autoport='no' listen='0' keymap='en-us'>
      <listen type='address' address='0'/>
    </graphics>
 ....
 3.start guest,check qemu cmd:
.....
-spice port=0,tls-port=5901,addr=0.0.0.0,disable-ticketing,x509-dir=/etc/pki/libvirt-spice,seamless-migration=on
.....

verification passed.

Comment 16 errata-xmlrpc 2013-11-21 08:46:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1581.html