Enable USB smartcard inside VMware

5,424

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.
Share:
5,424

Related videos on Youtube

Brent Bradburn
Author by

Brent Bradburn

I like C++, Go. I like GNU/Linux (even when it hurts). I like HTML+JavaScript (and markdown). Python3 is a terrific calculator.

Updated on November 24, 2022

Comments

  • Brent Bradburn
    Brent Bradburn over 1 year

    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)
    • Ramhound
      Ramhound almost 11 years
      Are you using a ClientWare/Middleware ( i.e. ActivClient ) of any kind?
    • Ramhound
      Ramhound almost 11 years
      What device are you using exactly? Would also be helpful to know which version of ActivClient your using. I often have to do the old "Nintendo Cartiage" trick on my card reader. Of course I am ActivClient within a Virtual Machine but it shouldn't make a difference. Have you tried the native Windows 7 supoprt by chance? If this is a DoD issued SmartCard the native support will work for all branches.
    • Brent Bradburn
      Brent Bradburn almost 11 years
      @Ramhound: My device is "Actividentity ACTIVKEY SIM 48010-C MAY09". It looks pretty-much like this. I interpret the "Nintendo Cartridge" trick to mean "blow the dust out" -- I really don't think that is the problem -- this device works fine in another computer. I don't know what you mean by "native Windows 7 support", but my system seems to be using a Microsoft driver -- running the ActivClient app appears to be optional.
    • Ramhound
      Ramhound almost 11 years
      Windows 7 and Windows 8 has the capability to handle everything that ActivClient does. Have you tried without the middleware software installed to see if it will work. I would consider the product you linked to be a smart card reader, more of a secure token device, since it can't actually read smart cards ( based on the picture ). Since it has no detector lights I have no other advice I can give.
    • Brent Bradburn
      Brent Bradburn almost 11 years
      I have attempted this with the ActivClient software both closed and uninstalled -- this seems to have no effect on my ability to use the key.
    • Brent Bradburn
      Brent Bradburn almost 11 years
      @Ramhound makes a good point: there is no "smart card" per se. This device is a "SIM token" which (I believe) functions as a reader with a built-in card. It is befuddling that, since the card cannot be removed, the error message that I get from ActivClient is "No Card Detected" -- even though it has no complaints about its ability to communicate with the "card reader". There must be some layer of complexity interfering with the driver, probably either in the Linux kernel or in the VMware software -- the Windows VM previously worked, before I moved it to a new workstation.
    • Ramhound
      Ramhound almost 11 years
      Can you try a even newer version of Workstation by chance? I was going to try this at home but I don't have that type of smart card reader. Lets just call it that since we both know what you are trying to do :-)
    • Brent Bradburn
      Brent Bradburn almost 11 years
      @Ramhound: I just downloaded and tested the newest VMware Player (5.0.2) today. I'm not using "VMware Workstation". Thanks for helping!
    • Ramhound
      Ramhound almost 11 years
      I apologize I of course meant VMWare Player . I dragged that into my head because of your own Workstation 7.1.2 reference.
  • Brent Bradburn
    Brent Bradburn almost 9 years
    Thanks for the post! Hopefully I'll get around to testing your suggestion sometime soon.