Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

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:
Embargoed:
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