Bug 904692

Summary: ccid-card-emulated doesn't have a 'database' property, it's called 'db'
Product: [Fedora] Fedora Reporter: Anthony Messina <amessina>
Component: libvirtAssignee: Eric Blake <eblake>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: amit.shah, berrange, cfergeau, clalancette, crobinso, dwmw2, eblake, itamar, jforbes, jyang, laine, libvirt-maint, pbonzini, rjones, scottt.tw, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: libvirt- Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 954263 (view as bug list) Environment:
Last Closed: 2013-06-24 23:24:33 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 954263    

Description Anthony Messina 2013-01-26 22:58:00 EST
When defining a VM with an emulated smartcard as specified at http://libvirt.org/formatdomain.html#elementsSmartcard, the VM won't start and issues the following error:

2013-01-27 03:38:19.224+0000: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=spice /usr/bin/qemu-kvm -name build2 -S -M pc-1.2 -enable-kvm -m 1024 -smp 2,sockets=2,cores=1,threads=1 -uuid 23979824-dcd9-5a8d-61a7-5f5bc625aedd -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/build2.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 -device usb-ccid,id=ccid0 -drive file=/var/lib/libvirt/images/build2.img,if=none,id=drive-virtio-disk0,format=raw -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive if=none,id=drive-ide0-1-0,readonly=on,format=raw -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=37,id=hostnet0,vhost=on,vhostfd=38 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:39:28:d9,bus=pci.0,addr=0x3 -device ccid-card-emulated,backend=certificates,cert1=cert1,cert2=cert2,cert3=cert3,database=/etc/pki/libvirt-smartcard,id=smartcard0,bus=ccid0.0 -chardev pty,id=charserial0 -device 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=5904,tls-port=5905,addr=,x509-dir=/etc/pki/libvirt-spice -vga qxl -global qxl-vga.vram_size=67108864 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
char device redirected to /dev/pts/6
qemu-kvm: -device ccid-card-emulated,backend=certificates,cert1=cert1,cert2=cert2,cert3=cert3,database=/etc/pki/libvirt-smartcard,id=smartcard0,bus=ccid0.0: Property '.database' not found
2013-01-27 03:38:19.871+0000: shutting down


In http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=blob;f=hw/ccid-card-emulated.c;h=f4a6da4283a3a27eaff154be7ad6ca75dee900d5;hb=HEAD#l25 (for roughly the version I'm using) it states that the parameter "db" should be used.

I'm not sure whether this is the issue, but db != database.  http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=blob;f=hw/ccid-card-emulated.c;h=f4a6da4283a3a27eaff154be7ad6ca75dee900d5;hb=HEAD#l118

Any help would be appreciated.  Thanks.
Comment 1 Anthony Messina 2013-01-26 23:31:55 EST
*** Bug 904693 has been marked as a duplicate of this bug. ***
Comment 2 Cole Robinson 2013-04-01 18:48:58 EDT
Thanks for the report Anthony, indeed it looks like libvirt is passing the wrong property here, it should be named db. Reassigning
Comment 3 Eric Blake 2013-04-01 18:58:10 EDT
You're probably one of the first people actively using this feature, since the bug has been there since it's introduction in v0.8.8 (Feb 2011).

Upstream patch proposal:

If that is accepted, I can backport to v0.10.2-maint for inclusion in the next F18 build.
Comment 4 Anthony Messina 2013-04-01 19:45:01 EDT
(In reply to comment #3)
> You're probably one of the first people actively using this feature, since
> the bug has been there since it's introduction in v0.8.8 (Feb 2011).

Hah!  And I was probably trying to use it incorrectly as well.  I was hoping to use the "fake" smartcard as a storage utility for kernel module signing keys to be used in a manner similar to pesign, but for external kernel modules to be signed from within a koji/mock buildroot on a VM.
Comment 5 Fedora Update System 2013-06-12 18:14:03 EDT
libvirt- has been submitted as an update for Fedora 18.
Comment 6 Fedora Update System 2013-06-13 22:26:44 EDT
Package libvirt-
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libvirt-'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2013-06-24 23:24:33 EDT
libvirt- has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.