VMware Cloud Community
doron1
Enthusiast
Enthusiast

ESXi 6.5 - hot plugging a USB device works on one VM but fails on another

Hi all,

I have some USB devices that are connected to my ESXi 6.5.0 host. At times, I need to hot plug them into VMs. When I edit one VM, add a USB device, assign the physical device and save, all works well and the device is plugged into the VM. When I do the same with the second VM, saving fails, saying "The attempted operation cannot be performed in the current state (Powered on)."

Both VMs run flavors of Linux x64 and both have tools installed and running (if that matters).

I checked the configs and "devices.hotplug" is not configured for either. I even tried setting "devices.hotplug" to TRUE but that didn't make a difference.

What could be the reason for one machine accepting USB hotplug and the other rejecting it?

Thanks in advance for any insight!

Tags (1)
0 Kudos
9 Replies
1337Thomas
Enthusiast
Enthusiast

did you check the vm hardware version? USB hot plug is only supported from HW 13 and up.

doron1
Enthusiast
Enthusiast

Thanks for your response.

I have virtualHW.version = "8" in both vmx files, if that's what you were referring to?

0 Kudos
scott28tt
VMware Employee
VMware Employee

Hardware Features Available with Virtual Machine Compatibility Settings


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
1337Thomas
Enthusiast
Enthusiast

yes. As scott mentioned.

right mouse your VM in vcenter compatibility, schedule vm compatibility upgrade.

choose 13, the latest since you are running on 6.5.

reboot the VM, the version will be changed to 13. Than your USB should work.

0 Kudos
doron1
Enthusiast
Enthusiast

Thank you both for the insights!

I'm still a bit confused though, since both VMs in this case are at hardware version 8, still ESXi lets one of them happily accept USB hot insertion while the other one it does not (with this error message about powered on state not valid for insertion).

(btw I could not find USB hot plugging as a feature in the table you pointed me to - what am I missing?)

0 Kudos
NathanosBlightc
Commander
Commander

Can you try to remove the USB device and then add it to the 2nd VM when it's not power-on?! is that possible to test the result?!

Please mark my comment as the Correct Answer if this solution resolved your problem
0 Kudos
doron1
Enthusiast
Enthusiast

Yes, I have done that already - no problem adding it to any of the VMs when the VM is powered off. The difference is only upon hot-insertion - when I add the USB device to the VM when the latter is powered on. In that scenario, one machine can be reconfigured (and sees the USB device), and the other cannot be reconfigured (ESXi rejects the saving with the error message described above).

0 Kudos
NathanosBlightc
Commander
Commander

Please check both of vmware.log in each of your VMs whenever you try to add the USB device to another VM. Is there any special error you find?

Please mark my comment as the Correct Answer if this solution resolved your problem
0 Kudos
doron1
Enthusiast
Enthusiast

Just retried and looked at the vmware.log - no apparent error. At the time of the reconfig attempt there's a list of all USB devices on the host, and where they are going (mostly already allocated to VMs), including the one I'm trying to hotplug in. Nothing more. Still I get the dreaded "Failed - The attempted operation cannot be performed in the current state (Powered on)."

0 Kudos