In testing under a Linux VM I've come across a VERY reproduceable problem with using SmartCards (in particular PIV).
Readers that can return a list of their speeds will fail before even getting to see a card
When reading data from a PIV (particularly large data objects using extended APDU), the usb layer will fail
Both of these errors state that the USB device suddenly became unavailable and recovery may or may not occur.
Attached is sample code that will compile under Linux w/ GCC if you have the pcsc-lite development libraries.
Affected VMWare hosts:
Windows Vista (VMWare Player 2.5)
Affected Linux guests:
Distros tested: Gentoo, Ubuntu, Fedora
PC/SC Lite version independent
Multiple kernels under one distro tested
Both bleeding-edge and stable libusb tested
Known Affected VMWare Software:
VMWare Player 2 and 2.5
VMWare Workstation 6
This is not using the Virtual SmartCard layer that passes an emulated CCID device to the OS (which doesn't work in Linux, even with the vendor/product added to PC/SC).
CryptoCard - SCR331
Gemplus PinPad - Fails during reader detection
GemTwin - Fails during reader detection
Many PIV vendors' cards were tested...
Compile test tool w/ command like:
gcc -o pcsc_get_data -I /usr/include/PCSC -lpcsclite pcsc_get_data.c
The utility will use the first reader, wait til a card is inserted (or use already-inserted), select the PIV applet, read the PIV Auth cert off of it.
While this is a really old thread it seems that the problem is still not solved, and what I have read here in this forum it is due to a faulty implementation of the vmware virtual smartcard reader.