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   
Whiteboard:
Fixed In Version: libvirt-0.10.2.6-1.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 954263 (view as bug list) Environment:
Last Closed: 2013-06-25 03:24:33 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: 954263    

Description Anthony Messina 2013-01-27 03:58:00 UTC
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=0.0.0.0,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

Using:
qemu-kvm-1.2.2-4.fc18.x86_64
libvirt-0.10.2.2-3.fc18.x86_64
virt-manager-0.9.4-4.fc18.noarch
kernel3.7.4-204.fc18.x86_64

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-27 04:31:55 UTC
*** Bug 904693 has been marked as a duplicate of this bug. ***

Comment 2 Cole Robinson 2013-04-01 22:48:58 UTC
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 22:58:10 UTC
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:
https://www.redhat.com/archives/libvir-list/2013-April/msg00056.html

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 23:45:01 UTC
(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 22:14:03 UTC
libvirt-0.10.2.6-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/libvirt-0.10.2.6-1.fc18

Comment 6 Fedora Update System 2013-06-14 02:26:44 UTC
Package libvirt-0.10.2.6-1.fc18:
* 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-0.10.2.6-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-10805/libvirt-0.10.2.6-1.fc18
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-06-25 03:24:33 UTC
libvirt-0.10.2.6-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.