c# - VMWare API disconnect USB-Passthrough -
i using vmware workstation (v11) run virtual machine testing. i'd pragmatically add , remove usb-devices attached system.
using vmware.vim;
can connect server , query it. can remove devices cd-drives , other things. can't disconnect usb-passthrough-device. either : "invalid config" or "unknown error" (most due lib being interopt , not transporting information)
my current code:
using vmware.vim; var dongle = devs.singleordefault(i => i.deviceinfo.summary.contains("silicon")); if (dongle != null) { var usbdongle = (dongle virtualusb); usbdongle.connected = false; var spec = new virtualmachineconfigspec() { devicechange = new[] { new virtualdeviceconfigspec() { device = dongle, operation = virtualdeviceconfigspecoperation.remove, } } }; vm.reconfigvm(spec);
neither operation = "remove" or "edit" has effect. i'm getting kind of error...
i appreciate ideas!
regards,
corelgott
Comments
Post a Comment