Programatically connect and disconnect USB devices in virtual machine

453 Views Asked by At

I'm developing automated testing for software which needs to eject and reconnect USB devices automatically at the BUS level, not simply software.

This makes a virtual environment optimum because the virtual hardware can be controlled to emulate such behavior. However, I cannot find a way to do this programmatically through VMWare, VirtualBox, or Zen.

Is this kind of functionality implementable? Thank you!

1

There are 1 best solutions below

0
jay liu On

using VSPhere API, it's soap based web service that can do the same thing as you using VSphere client.

there is a interface called: ReconfigVM_Task may be you can use, see ref at: Vsphere API Reference