I am using the VI SDK to query a VM's vmPathName and noticed that it is returned in different formats depending on the method used to query it.
Calling RetrieveProperties on the vm returns summary.config.vmPathName = "[storage2] Chris/Development.vmx"
Calling QueryHostConnectionInfo on the host returns vm[i].config.vmPathName = "sanfs://vmfs_uuid:{uuid of storage2}/Chris/Development.vmx"
You can see the same behavior through the managed object browser.
I guess the workaround is to use the datastore url to map one format to the other.
Is this difference intended, and should I expect it to stay like that in future versions?
Thanks,
Tim.
Hi Tim,
I tried using mob and checked out the values for vmPathName, narrowing down on summary.config.vmPathName on a vm and tried getting the vmPathName from vm summary using QueryHostConnectionInfo method.
The vm paths fetched were same, in all cases. I have tried this ESX 3.0.2 and ESX 3.5. Is there a specific version, you are facing problems with?
Regards,
Dildip
Thanks Dildip for the quick response. I am using the SDK or MOB on "VMware VirtualCenter 2.5.0 build-64192" to access "VMware ESX Server 3.0.1 build-32039" and "VMware ESX Server 3.5.0 build-64607", same story on both. You're right, it doesn't seem to occur when connecting to ESX directly.
Regards,
Tim.