Unable to Passthrough USB security key to a virtual machine on ESXi Host
search cancel

Unable to Passthrough USB security key to a virtual machine on ESXi Host

book

Article ID: 387417

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

After connecting a USB license dongle to an ESXi host, the host properly recognizes the device and passthrough can successfully be enabled on host level

However, when attempting to attach the device to a virtual machine, the reconfiguration fails with "Cannot connect "path:#/#/#" to this virtual machine. The device was not found."

In the /var/run/log/vmkernel.log:

YYYY-MM-DDThh:mm:ss.xxxZ cpu7:3750740)VSCSIFs: 4208: handle 8258(vscsi0:1):Invalid Opcode (0x4d) from (vmm0:<vm_name>)
YYYY-MM-DDThh:mm:ss.xxxZ cpu7:3750740)VSCSIFs: 4208: handle 8257(vscsi0:0):Invalid Opcode (0x4d) from (vmm0:<vm_name>)

Resolution

Ensure taking a backup of the Virtual Machine before performing the below steps.

To enable the passthrough, use the following steps:

1. Power off the Virtual Machine 

2. SSH to the ESXi as root and navigate to the directory where the virtual machine's files are stored (e.g., cd /vmfs/volumes/your_datastore_name/Your_VM_Name/).

3. Use the vi editor to edit the .vmx configuration file of the VM Tips for editing a .vmx file

4. Add the following line to the file: 

usb.generic.allowCCID = "TRUE"

5. Save the changes to the .vmx file and close the editor.

6. Edit the settings of your virtual machine. Add the desired USB device to the virtual machine as a passthrough device Add USB Devices from an ESXi Host to a Virtual Machine

7. Power on the virtual machine to apply the new configuration and make the USB device available.

Additional Information

Certain devices might require additional settings. If the issue still persists with the above configuration, please refer to Configuring Hardware Security Token USB Passthrough in vSphere Environment