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!
did you check the vm hardware version? USB hot plug is only supported from HW 13 and up.
Thanks for your response.
I have virtualHW.version = "8" in both vmx files, if that's what you were referring to?
Hardware Features Available with Virtual Machine Compatibility Settings
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.
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?)
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?!
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).
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?
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)."