VMware {code} Community
amishera
Contributor
Contributor

Programmatically doing the vmdirectpath

Hi,

I was trying to find how to do the vmdirectpath (ie releasing the device from host and then assigning it to the guest as pass-thru device) programmatically. However, after searching a long time the closest I came up with is:

1. From tech support mode release the device from host using the command "vmkchdev". However it seems to be unstable and hangs the system. Only other choice seems to be to edit the esx.conf file manually.

2. Edit the vmx file for the VM to add the desired device.

3. power on the guest.

Now the problem is that this is a very unelegant approach (TSM is not allowed usually) and I am not sure whether this will really work. And there is obviously a programmatic counterpart because the same thing can be done from vsphere client (GUI) and which is supposed to use web service to perform the operation. Hence, there is supposed to be a webservice api available. But after extensive searching I can't locate this. Now I am suspecting whether there is really any such option existent for vsphere SDK/API (ie non-proprietary/publicly available option not exclusive to the vmware).

I would appreciate greatly if someone could confirm whether there is an API existent or not and also what is the namespace/package name to do the vmdirectpath.

Thanks

0 Kudos
0 Replies