Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 179681

Discover USB Devices available for passthru

$
0
0

So here's a challenge that I seem to be needing a little bit of help with.

 

Basically I what I'm trying to do is trigger an alarm in vCenter when the Host USB Configuration has changed, once that alarm is triggered I want to run a PowerCLI or any script for that matter to detect if that USB config change had anything to do with a UPS that I have plugged into the host.  If it did (meaning the UPS was either unplugged and/or moved to a different USB Port) I want to go through the process of re-adding the UPS usb device through to the VM.

 

So, I've gotten as far as triggering and alarm, and determining the connection status of the UPS's USB connection.  What I can't seem to do is figure out how to re-add the usb device if it was moved to a different port.  I tried using ONYX to gen some code for me, however it appears I need to know what the device.backing.deviceName is - something along the lines of "path:2/0/7 version:2" - which would obviously change depeding on what usb port it was plugged into...

 

So any help on either adding a USB device to a VM through PowerCLI or vCO or any sort of CLI fashion would be great

or

if at the very least I could poll the host's USB devices to see what was connected to what port that might get me through as well..

 

make sense?

 

Thanks,

Mike


Viewing all articles
Browse latest Browse all 179681

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>