Bug 677308

Summary: missing > in the xml generated by libvirt for smartcard
Product: Red Hat Enterprise Linux 6 Reporter: Vivian Bian <vbian>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 6.1CC: dyuan, eblake, gren, jdenemar, llim, mzhan, syeghiay, veillard, xen-maint, zpeng
Target Milestone: rcKeywords: TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.8.7-7.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:27:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 641834    

Description Vivian Bian 2011-02-14 10:31:56 UTC
Description of problem:
paste the following section into guest.xml for smartcard support , will always get following error , and following xml translation result :

[what is pasted]

    <smartcard mode='host'/>
    <smartcard mode='host-certificates'>
      <certificate>cert1</certificate>
      <certificate>cert2</certificate>
      <certificate>cert3</certificate>
      <database>/etc/pki/nssdb/</database>
    </smartcard>
    <smartcard mode='passthrough' type='tcp'>
      <source mode='bind' host='127.0.0.1' service='2001'/>
      <protocol type='raw'/>
      <address type='ccid' controller='0' slot='0'/>
    </smartcard>
    <smartcard mode='passthrough' type='spicevmc'/>

[what is generated by libvirt]

line 46 : 
<smartcard mode='host'      <address type='ccid' controller='0' slot='1'/>

[error output]
error: Failed to start domain windows
error: at line 46: error parsing attribute name


Version-Release number of selected component (if applicable):
libvirt-0.8.7-6.el6.x86_64

How reproducible:
always


  
Actual results:


Expected results:


Additional info:
since on Bug 641834 - RFE: Spice / smartcard support , we need to paste the above xml into guest.xml . And now , we meet this bug , so can't verify 641834 bug . Set this bug to TEST BLOCKER

Comment 3 Jiri Denemark 2011-02-14 11:49:50 UTC
Patch sent upstream for review: https://www.redhat.com/archives/libvir-list/2011-February/msg00426.html

Comment 4 Jiri Denemark 2011-02-14 20:19:55 UTC
Patch sent to rhvirt-patches

Comment 7 Vivian Bian 2011-02-18 09:24:04 UTC
verified with libvirt-0.8.7-7.el6.x86_64

pasted

    <smartcard mode='host'/>


got
    <smartcard mode='host'>
      <address type='ccid' controller='0' slot='0'/>
    </smartcard>



pasted 

    <smartcard mode='host-certificates'>
      <certificate>cert1</certificate>
      <certificate>cert2</certificate>
      <certificate>cert3</certificate>
      <database>/etc/pki/nssdb/</database>
    </smartcard>

got 
    <smartcard mode='host-certificates'>
    </smartcard>


pasted
    <smartcard mode='passthrough' type='tcp'>
      <source mode='bind' host='127.0.0.1' service='2001'/>
      <protocol type='raw'/>
      <address type='ccid' controller='0' slot='0'/>
    </smartcard>

got
    <smartcard mode='passthrough' type='tcp'>
      <alias name='smartcard0'/>
    </smartcard>


pasted 
    <smartcard mode='passthrough' type='spicevmc'/>

got 
    <smartcard mode='passthrough' type='spicevmc'>
      <alias name='smartcard0'/>
      <address type='ccid' controller='0' slot='0'/>
    </smartcard>



no ">" missed after parsing . So set bug status to VERIFIED

Comment 8 Vivian Bian 2011-04-18 07:19:15 UTC
tested with 
libvirt-0.8.7-17.el6.x86_64
qemu-kvm-0.12.1.2-2.158.el6.x86_64
kernel-2.6.32-131.0.1.el6.x86_64

we won't get > missed in the xml generated . So keep the VERIFIED status

Comment 11 errata-xmlrpc 2011-05-19 13:27:19 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0596.html