- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Not sure if I understood what you need, but let me give a try.
If you are using PowerShell, you can simply call VMHost VM Property and it will return the ESXi object.
Ex: $vm.VMHost
Any other programming language, I guess you can do it through a vim.VirtualMachine object accessing vm_obj.summary.runtime.host or simply vm_obj.runtime.host
Have a look on https://vdc-repo.vmware.com/vmwb-repository/dcr-public/1ef6c336-7bef-477d-b9bb-caa1767d7e30/82521f49... maybe it helps.