Bug 1253005 - Smartcard does not show up on SPICE guest
Smartcard does not show up on SPICE guest
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-server (Show other bugs)
6.7
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Default Assignee for SPICE Bugs
SPICE QE bug list
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-12 13:24 EDT by Bill Sanford
Modified: 2015-08-17 16:08 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-17 16:08:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill Sanford 2015-08-12 13:24:39 EDT
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 13:39:55 EDT
(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 13:07:37 EDT
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 13:38:28 EDT
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 14:10:57 EDT
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 05:44:07 EDT
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 10:41:47 EDT
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 11:07:18 EDT
(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 11:07:26 EDT
(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 11:09:41 EDT
(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 14:16:02 EDT
(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 14:27:06 EDT
(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 15:28:46 EDT
Uri, I also have those exact packages installed.

What does your command line look like?
Comment 15 Uri Lublin 2015-08-17 15:33:35 EDT
(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 16:08:49 EDT
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.