Configuring USB HID/CCID Passthrough to ESXi host
search cancel

Configuring USB HID/CCID Passthrough to ESXi host

book

Article ID: 323377

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Configure USB HID/CCID Passthrough to ESXi Host


Symptoms:

  1. Unable to configure USB HID/CCID Passthrough to ESXi host.
  2. USB device connected to the ESXi host is not working.



Environment

VMware vSphere ESXi 7.0

Resolution

  • in order to Configure USB HID Passthrough,  run the below command to display information about USB buses and the devices connected to them:
    • lsusb
    • Note down the devices ID as highlighted below:
    •  
  1. Then need to ensure that the vmkusb module is enabled, using the below command: 
    • #esxcli system module list | grep vmkusb
      Name                           Is Loaded  Is Enabled
      -----------------------------  ---------  ----------
      vmkusb                             false        true
  2. If it's not enabled, use the below command to enable it
    • #esxcli system module set -m=vmkusb -e=TRUE
  3. Run the below command to list all the PCI devices and we check for the USB device (Module Name: vmkusb) to verify the Vendor ID, Device ID, SubVendor ID & SubDevice ID.
    • #esxcli hardware pci list
  4. Then need to let the USB arbitrator service be aware of these USB device quirks by adding the usb.quirks.deviceN string to /etc/vmware/config file:
    • #vi /etc/vmware/config
      
      Pressed I to insert
      
      #usb.quirks.device0 = "0e0f:8003 allow"
      #usb.quirks.device1 = "12d1:0003 allow"
      
      Pressed ESC, and the :wq! to save.
      The IDs 0e0f:8003 & 12d1:0003 are noted from the lsusb command.
  5. Lastly, need to add the following string to the ESXi boot option to disable the VMkernel from claiming HID USB devices, in order to append this we had to edit /bootbank/boot.cfg file with the below line at the end of the line below "kernelopt=autoPartition=FALSE".
  6. The USB quirks are given in sets of five parameters vendorID:deviceID:minRevision:maxRevision:quirkName If you wish to specify multiple devices, you will need to ensure all five parameters are included. Here's an example for specifying two USB devices (For the IDs 0e0f:8003 & 12d1:0003, noted from the lsusb command):
    • #CONFIG./USB/quirks=0x0e0f:0x8003::0xffff:UQ_KBD_IGNORE:0x12d1:0x0003::0xffff:UQ_KBD_IGNORE
  7. For a single device use this format:
    • #CONFIG./USB/quirks=0xXXXX:0xYYYY::0xffff:UQ_KBD_IGNORE
      where 0xXXXX = vendorId and 0xYYYY = deviceId.
  8. Then need to ensure that the usbarbitrator service status is running: 
    • #/etc/init.d/usbarbitrator status
      Running
      
  9. If it's not running start it using "/etc/init.d/usbarbitrator start".
  10. Finally, reboot the ESXi host, once it is back, run the below command:
    • #esxcli hardware usb passthrough device list
      to List USB devices and their passthrough status and verify that "Enabled = True" for the desired USB device.