Using the SOAP interfaces via C# proxies
I have a VM ManagedObjectRef and I wanted to derive the HostSystem for it. From what I see in the MOB it seems like the only way to get it would be to walk up to the DC for the VM using the VM.parent and then walk down via the hostFolder and check each Host.vm[] in the DC for the VM.value.
Am I just missing the easy route?
Check out: http://pubs.vmware.com/vi301/sdk/ReferenceGuide/vim.vm.RuntimeInfo.html
vm.runtime.host contains a ManagedObjectReference to the HostSystem for the VM, if it's running or assigned to run on a particular host.
Arrgghhh! Man I knew it was going to be obvious. Didn't think of checking the runtime reference.
Thanks!