Bug 697398

Summary: with smartcard section with host mode set in guest xml ,guest won't get started
Product: Red Hat Enterprise Linux 6 Reporter: Vivian Bian <vbian>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.1CC: dyuan, eblake, jdenemar, llim, mshao, mzhan, veillard
Target Milestone: rcKeywords: TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-18 08:38:00 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-04-18 07:07:06 UTC
Description of problem:


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


How reproducible:
always 

Steps to Reproduce:
1. edit guest xml with   <smartcard mode='host'/> added 
2. try to start guest 
3.
  
Actual results:
# virsh start local
error: Failed to start domain local
error: unsupported configuration: this QEMU binary lacks smartcard host mode support

# virsh dumpxml local |grep smartcard
    <smartcard mode='host'>
    </smartcard>


Expected results:
Guest could be started successfully 

Additional info:
tested in libvirt-0.8.7-7.el6.x86_64.rpm
the bug happens in the old version , too . So it is not a regression bug . But since we have the [Bug 641834] RFE: Spice  / smartcard support , which is with 6.1.0 + flag . This bug must be the blocker bug to get this 641834 one verified . So set blocker as well . And set the severity and priority to URGENT and URGENT

Comment 1 Vivian Bian 2011-04-18 07:14:57 UTC
tested with following 4 kinds of libvirt supported sections: 

[Scenario 1]
    <smartcard mode='host'/>

# virsh start local
error: Failed to start domain local
error: unsupported configuration: this QEMU binary lacks smartcard host mode support


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

# virsh start local
error: Failed to start domain local
error: unsupported configuration: this QEMU binary lacks smartcard host mode support

[Scenario 3]
    <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>

# virsh start local
Domain local started

[Scenario 4]
    <smartcard mode='passthrough' type='spicevmc'/>
# virsh start local
Domain local started

Comment 2 Vivian Bian 2011-04-18 08:38:00 UTC
#  /usr/libexec/qemu-kvm -device ? |grep smartcard -i

name "usb-ccid", bus USB, desc "CCID Rev 1.1 smartcard reader"
name "ccid-card-passthru", bus ccid-bus, desc "passthrough smartcard"

So the only supported mode is passthrough . No host mode is available by now . So that is surely an unsupported QEMU feature . Libvirt did the correct thing . 

Close this bug as NOTABUG