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 1253005 - Smartcard does not show up on SPICE guest
Summary: Smartcard does not show up on SPICE guest
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-server
Version: 6.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Default Assignee for SPICE Bugs
QA Contact: SPICE QE bug list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-12 17:24 UTC by Bill Sanford
Modified: 2015-08-17 20:08 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-17 20:08:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bill Sanford 2015-08-12 17:24:39 UTC
Description of problem:
The smartcard from the host does not show in the guest.

Version-Release number of selected component (if applicable):
RHEL-6.7-20150805.2 - base and optional - Host and client
Supp-6.7-RHEL-6-20150702.0 - Host and client

RHEL-6-20150702.0 - guest 
Firefox 38.0.1 - guest 

On the Host:
spice-glib-0.26-4.el6.x86_64
spice-gtk-devel-0.26-4.el6.x86_64
spice-gtk-python-0.26-4.el6.x86_64
spice-server-devel-0.12.4-12.el6.x86_64
spice-gtk-0.26-4.el6.x86_64
spice-protocol-0.12.6-1.el6.noarch
spice-glib-devel-0.26-4.el6.x86_64
spice-usb-share-4.9-9.el6.x86_64
spice-client-0.8.2-15.el6.x86_64
spice-server-0.12.4-12.el6.x86_64
spice-xpi-2.7-27.el6.x86_64
spice-vdagent-0.14.0-9.el6.x86_64
kmod-kspiceusb-rhel60-4.9-14.el6.x86_64
spice-gtk-tools-0.26-4.el6.x86_64
xorg-x11-drv-qxl-0.1.1-17.el6.x86_64
kernel-2.6.32-573.el6.x86_64
nss-tools-3.19.1-3.el6_6.x86_64
coolkey-1.1.0-35.el6.x86_64
pam_pkcs11-0.6.2-14.el6.x86_64
p11-kit-0.18.5-2.el6_5.2.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Follow setup and execution https://wiki.test.redhat.com/Desktop/Technologies/Spice/Testplans/Migration for "Seamless Migration, Native Multimonitor and USB Migration"
2. remote-viewer spice://$SRCIPADDR?port=3001 --spice-smartcard
3.

Actual results:
Smartcard does not show up on guest

Expected results:
Smartcard shows up on guest

Additional info:

Comment 1 Christophe Fergeau 2015-08-12 17:39:55 UTC
(In reply to Bill Sanford from comment #0)
> 1.Follow setup and execution
> https://wiki.test.redhat.com/Desktop/Technologies/Spice/Testplans/Migration
> for "Seamless Migration, Native Multimonitor and USB Migration"

It would be great if you could document exactly what you did (command lines you used) in the bug report so that it's as self contained as possible. The instructions you refer to do not seem to have anything smartcard related (see http://www.spice-space.org/page/SmartcardUsage )

> Actual results:
> Smartcard does not show up on guest

Can you define "show up on the guest"? Are you running some command in the guest? Expecting some smartcard-triggered behaviour when using the guest?

Comment 4 Bill Sanford 2015-08-13 17:07:37 UTC
Christophe: 

/usr/libexec/qemu-kvm -m 1024 -spice port=3001,disable-ticketing,addr=127.0.0.1,seamless-migration=on -vga qxl /home/images/rhel67.img -monitor stdio -device intel-hda -device hda-duplex -chardev spicevmc,server,host=127.0.0.1,name=smartcard,id=ccid -device usb-ccid -device ccid-card-passthru,chardev=ccid -usb

/usr/libexec/qemu-kvm -m 1024 -spice port=3002,disable-ticketing,addr=127.0.0.1,seamless-migration=on -vga qxl /home/images/rhel67.img -monitor stdio -incoming tcp:127.0.0.1:4444 -device intel-hda -device hda-duplex -chardev spicevmc,server,host=127.0.0.1,name=smartcard,id=ccid -device usb-ccid -device ccid-card-passthru,chardev=ccid -usb


client_migrate_info spice 127.0.0.1 3002
migrate -d tcp:127.0.0.1:4444
info migrate

Comment 5 Christophe Fergeau 2015-08-13 17:38:28 UTC
Ok, detailed 'steps to reproduce' and 'expected result' please. From the initial report, it's not clear at all that a migration is involved, nor when the smartcard does not show in the guest. You also haven't clarified what you mean with "smartcard does not show in the guest" (see comment #1)

Comment 6 Bill Sanford 2015-08-14 18:10:57 UTC
Created RHEL 6.7 VM with virt-manager. Added SPICE diplay, QXL driver, Redirected USB, and Smartcard. Added the Smartcard as a Passthrough device. Made sure VM was off.
 
First terminal:
/usr/libexec/qemu-kvm -m 1024 -spice port=3001,disable-ticketing,addr=127.0.0.1,seamless-migration=on -vga qxl /home/images/rhel67.img -monitor stdio -device intel-hda -device hda-duplex -chardev spicevmc,server,host=127.0.0.1,name=smartcard,id=ccid -device usb-ccid -device ccid-card-passthru,chardev=ccid -usb

Second terminal
remote-viewer spice://127.0.0.1?port=3001 --spice-smartcard

I expect the Smartcard to show up in the guest and be seen by the Smart Card Manager like it is in the host. I only see the smartcard in the host, and not in guest.

Comment 7 Uri Lublin 2015-08-17 09:44:07 UTC
Before the migration, does the smartcard shows up in the guest and is seen by
Smart Card Manager ?

Comment 8 Uri Lublin 2015-08-17 14:41:47 UTC
Works for me for both Host and Guest running RHEL-6.7

Host:
coolkey-1.1.0-35.el6.x86_64
nss-tools-3.19.1-3.el6_6.x86_64
p11-kit-0.18.5-2.el6_5.2.x86_64
pam_pkcs11-0.6.2-14.el6.x86_64
spice-glib-0.26-4.el6.x86_64
spice-gtk-0.26-4.el6.x86_64
spice-protocol-0.12.6-1.el6.noarch
spice-server-0.12.4-12.el6.x86_64

Guest:
coolkey-1.1.0-35.el6.x86_64
nss-tools-3.18.0-5.3.el6_6.x86_64
p11-kit-0.18.5-2.el6_5.2.x86_64

Using command lines similar those in comment #6
(so spice-vdagent is not running on the guest)

Comment 9 Bill Sanford 2015-08-17 15:07:18 UTC
(In reply to Uri Lublin from comment #7)
> Before the migration, does the smartcard shows up in the guest and is seen by
> Smart Card Manager ?

I was planning on migrating the guest, but the smartcard never showed in guest.

Comment 10 Bill Sanford 2015-08-17 15:07:26 UTC
(In reply to Uri Lublin from comment #7)
> Before the migration, does the smartcard shows up in the guest and is seen by
> Smart Card Manager ?

I was planning on migrating the guest, but the smartcard never showed in guest.

Comment 11 Bill Sanford 2015-08-17 15:09:41 UTC
(In reply to Uri Lublin from comment #8)
> Works for me for both Host and Guest running RHEL-6.7
> 
> Host:
> coolkey-1.1.0-35.el6.x86_64
> nss-tools-3.19.1-3.el6_6.x86_64
> p11-kit-0.18.5-2.el6_5.2.x86_64
> pam_pkcs11-0.6.2-14.el6.x86_64
> spice-glib-0.26-4.el6.x86_64
> spice-gtk-0.26-4.el6.x86_64
> spice-protocol-0.12.6-1.el6.noarch
> spice-server-0.12.4-12.el6.x86_64
> 
> Guest:
> coolkey-1.1.0-35.el6.x86_64
> nss-tools-3.18.0-5.3.el6_6.x86_64
> p11-kit-0.18.5-2.el6_5.2.x86_64
> 
> Using command lines similar those in comment #6
> (so spice-vdagent is not running on the guest)

Uri, if you have a different command line then in comment #6, can you post it here?

Comment 12 Uri Lublin 2015-08-17 18:16:02 UTC
(In reply to Bill Sanford from comment #11)
> Uri, if you have a different command line then in comment #6, can you post
> it here?

The only difference in the command line the image file location + name.

I also have the following package (on both host and guest)
pcsc-lite-1.5.2-15.el6.x86_64
pam_pkcs11-0.6.2-14.el6.x86_64
ccid-1.3.9-7.el6.x86_64

And I removed pcsc-lite-openct package from both.

Also I have service pcscd running on both.

Comment 13 Uri Lublin 2015-08-17 18:27:06 UTC
(In reply to Uri Lublin from comment #12)
> I also have the following package (on both host and guest)
> pcsc-lite-1.5.2-15.el6.x86_64
> pam_pkcs11-0.6.2-14.el6.x86_64
> ccid-1.3.9-7.el6.x86_64

The package pam_pkcs11 is not really required.

I installed it so I could run pkcs11_listcerts.
(bottom of http://www.spice-space.org/page/SmartcardUsage
 mentioned in comment #1)

Comment 14 Bill Sanford 2015-08-17 19:28:46 UTC
Uri, I also have those exact packages installed.

What does your command line look like?

Comment 15 Uri Lublin 2015-08-17 19:33:35 UTC
(In reply to Bill Sanford from comment #14)
> Uri, I also have those exact packages installed.

/usr/libexec/qemu-kvm -m 1024 -spice port=3001,disable-ticketing,addr=127.0.0.1,seamless-migration=on -vga qxl /images/rhel64_migration.qcow2 -monitor stdio -device intel-hda -device hda-duplex -chardev spicevmc,server,host=127.0.0.1,name=smartcard,id=ccid -device usb-ccid -device ccid-card-passthru,chardev=ccid -usb

[ the image name is rhel64 but it really is a RHEL-6.7 ]

Comment 16 Bill Sanford 2015-08-17 20:08:49 UTC
I had everything the same except for the "service pcscd restart" command. If you shut down the VM, run this command on the host, and then restart the same VM, this should work.


Note You need to log in before you can comment on or make changes to this bug.