VMware Cloud Community
jonschuster2
Contributor
Contributor

ESXi 6.5 - USB HID Devices into Guest VM

Hello Everyone,

I'll start by saying I've spent the last few days consistently trying to find a solution to my problem.  If the answer is obviously out there, I'm sorry, cause I missed it.

My host has ESXi 6.5 installed on it.  I want one of the VMs to function as my (physical) desktop computer.  I have successfully passed through my GTX 1060 (PCIE GPU), so when I boot the VM up, it beautifully displays on my physical monitor.  The drivers successfully installed too.

My challenge now is to get a physical keyboard and mouse dedicated to the Windows VM, rather than the console.  My Windows VM has a USB controller.  With that said, here is my thought process:

- When I add a "USB Device", HID (mouse and keyboard) devices are not shown.  My SanDisk Cruzer USB drive immediately shows up, but neither my Microsoft media keyboard, or my 2 other usb periphrials (1 mouse 1 keyboard) show up to pass through.  However, when I SSH into my ESXi server, and I run the command "lsusb", all the devices (including keyboards) show up. So this tells me my host is recognizing it, but intentionally not allowing it to be passed through.

I read online that this is intentional, so you accidentally don't lock yourself out of your console.  I am perfectly happy with my console not responding to my keyboard.  I found a few flags online, to put in the VMX file of the VM, but these did not work.  I tried rebooting my host.

I thought of passing through the entire USB interface.  The Web Admin only shows that I have 1 USB Controller (Intel).  It is not capable of pass through (greyed out).  I think this is because the console has confiscated it, do the usb driver can run.  So there is nothing I can simply pass through.

I tried reverting to the legacy USB drivers (disable the new VMKUSB driver) , by using SSH, and entering, "esxcli system module set -m=vmkusb -e=FALSE".  When I enter this command, and reboot my host, the only usb device I see is "intel bluetooth", which is obviously confusing for me.

I don't have another PCIE slot to put in a USB hub, so I think my only option at this point is to figure out a way for HID devices to be allowed as USB devices by ESXi.  It's comically ridiculous that it's this hard to simply plug a usb device into a VM.

I have only been using the Web Admin.  I tried installing the VMware client for windows, but it is not supported by my version of ESXi (6.5)

Thank you for reading my question.  I really appreciate your time and help!

Tags (3)
Reply
0 Kudos
9 Replies
jonschuster2
Contributor
Contributor

A quick update, as I'm still trying to figure this out.

- I found some interesting ESXCli commands regarding USB.  Here they are

esxcli hardware usb passthrough device enable(disable)

esxcli hardware usb passthrough device list

I have 2 usb keyboards plugged into the host, as well as a SanDisk USB drive.  The USB drive shows up when I list the items, but the keyboards do not.  When I run the "enable" command, with the device info I get from the command "lsusb",  there are no complaints from the shell.  I tested and I was successfull at disabling the SanDisk drive, then re-enabling it.  Because of this, I know I am using the command right.  When I swap the device info with the keyboard, there are no complaints, but it still doesn't show up as an option in the USB passthrough section.  VERY FRUSTRATING!!!!

Thanks everyone, have a nice Sunday!

Reply
0 Kudos
vijayrana968
Virtuoso
Virtuoso

Just another way to get it working.. Smiley Happy

Enable USB Support for ESXi with VMDirectPath

Reply
0 Kudos
NetxRunner
Enthusiast
Enthusiast

According to this article, "USB devices such as mice and keyboards that have a bootable HID interface are not available for passthrough": Supported USB device models for passthrough from an ESX or ESXi host to a virtual machine (1021345) ...

Reply
0 Kudos
NetxRunner
Enthusiast
Enthusiast

Just wanted to add that there is also a hardware solution available which seems to provide USB passthrough specifically for HID: Digi AnywhereUSB/2 reliably attaches my keyboard and mouse to Windows 10 VM on a VMware ESXi SuperSe...

Worth a try, I guess.

Reply
0 Kudos
Drift_Pig
Contributor
Contributor

Hey Bud, if you still haven't found a good answer, pass through a USB root hub, once that is done plug mouse keyboard etc into those usb ports, once they are reconized, uninstall all VMware usb pointing devices, and there we go

Just did now, running 3 gaming machines from esx Smiley Happy(each has 8 cpu,16gb ram and a GTX 960)

Chur

Reply
0 Kudos
jzee1
Contributor
Contributor

Can you elaborate on how you passed through the USB hub?  When I plug in a hub, it still says "No USB Devices Available".  Are you doing this through vSphere Web Client or vCenter?

Thanks!

Reply
0 Kudos
Shananiganeer
Contributor
Contributor

He means that he did a PCI Passthrough on the USB hub on the mobo. Any USB devices that get connected to that hub are directly connected to the VM.

Reply
0 Kudos
jUDASmILExAlmig
Enthusiast
Enthusiast

To enable HID devices' passthrough, you may try to add this option in .vmx directly: "usb.generic.allowHID=TRUE"

This option will allow you to passthrough HID devices to VM.

Reply
0 Kudos
rideoverit
Contributor
Contributor

I'm in the same boat as the original poster.  I have successfully passed through the GPU.

The xHCI USB controller is owned by root port so i cannot passthru.

I do not want a HW solution.

I do not have space for another PCIe device.

the "usb.generic.allowHID" is only for VMWorkstation

I've tried various things for months.

Anyone had any luck here?

Any USB quirks?

any usbarb.rules?

Potentially even modifying the usbarbitrator source?

Reply
0 Kudos