Enable USB smartcard inside VMware

Posted on

Problem :

I am running Windows 7 inside VMWare Player on a Linux host. I want to use a USB smart card reader but it is not working. The client app reports: “No Card Detected“, but it appears to recognize that the “reader” is connected and working. The Windows driver “Microsoft Usbccid Smartcard Reader (WUDF)” also reports “This device is working properly”.

I had this setup working (with the same virtual machine) on an earlier version of Linux and with an earlier VMWare Player. At that time, I had used the following addition to the .vmx file to get things working:

uhci.syncWriteback = "TRUE"
usb.generic.skipsetconfig = "TRUE"
usb.generic.allowCCID = "TRUE"

After a new Linux install, including new VMware Player, I can no longer use my smart card with the Windows 7 virtual machine. Is there a new trick to get this working?

version notes

Working versions:

  • Distro: Linux Mint 10 Julia
  • Kernel: 2.6.35-28-generic (64-bit)
  • Player: 3.1.2 (corresponds to Workstation 7.1.2?)

Non working versions:

  • Distro: Linux Mint 14 Nadia, 3.5.0-28-generic (64-bit)
  • Distro: Linux Mint 15 Olivia, 3.8.0-25-generic (64-bit)
  • Player: 4.0.6-1035888.x86_64
  • Player: 5.0.2-1031769.x86_64
  • Player: 3.1.6-744570.x86_64 (was unable to install due to kernel version)

It isn’t clear whether this problem was introduced by the kernel change or by the VMware change.

Host access test (Linux-side)

$ sudo openct-control init

[ ~ ]
$ sudo openct-tool wait
Card detected

[ ~ ]
$ sudo openct-control status
No.   Name                         Info
===================================================
  0   CCID Compatible              slot0: card present

The following command reports failure, but interestingly, turns on the green light.

$ sudo openct-tool read
Detected CCID Compatible
Card present, status changed
failed to read memory card: Operation not supported

Follow up: I got identical results when running this test in a Linux client (3.0.0-16-generic).

Things to try

Alternatives

  • Use a dedicated second computer just for VPN — with access to a file-share (or USB drive)
  • Setup VPN directly from Linux (host or guest)
  • Install a Linux distro with the old kernel (Mint 9)

Solution :

This is a known issue answered in the following KB: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2000350&plainview=true

  1. in linux terminal issue lsusb commend to see what the vendor and product id of your smart card reader
  2. Open your .vmx file in a text editor
  3. Add this line, replacing and with the values you found earlier:
    usb.quirks.device0 = “0x:0x allow”
    Example: For the Apple device found in step 2, this line is:
    usb.quirks.device0 = “0x05ac:0x8240 allow”
  4. Save and close the .vmx file.

Leave a Reply

Your email address will not be published. Required fields are marked *