Good morning,
for my degree thesis i need to print the complete Vcenter (VSphere5.0) inventory whit java. I'm using the SDK example "browser" but i can't associate which VMs belong to Hosts. How can i associate VMs to Hosts? Thank you very much since now.
giuseppe
Hi Giuseppe!
How can i associate VMs to Hosts?
I have not even taken a look at example "browser" but here a quick pointer, maybe it helps:
Managed Object VirtualMachine provides a nested property pointing to the host system responsible for running the virtual machine in question as follows
VM.runtimeinfo.host
The other way arround would be via Managed Object HostSystem as follows
HS.vm[]
Hope this helps and good luck with your thesis 😉
Hi Giuseppe!
How can i associate VMs to Hosts?
I have not even taken a look at example "browser" but here a quick pointer, maybe it helps:
Managed Object VirtualMachine provides a nested property pointing to the host system responsible for running the virtual machine in question as follows
VM.runtimeinfo.host
The other way arround would be via Managed Object HostSystem as follows
HS.vm[]
Hope this helps and good luck with your thesis 😉
Hi,
The hierarchy is like this if it is a Esx host.
Folder -> Data Center -> Host -> VMs.
For a vCenter the hierarchy could be(Could be because Cluster should be configured by you).
Folder -> Data Center -> Cluster -> Host -> VMs
With the IP and credentials you can derive the folder and rest is just a child entity to the object each object. Let me know if you need more details.
./Siva.,
Thank you very much to all!
giuseppe
Hi Giuseppe!
You are welcome and thanks for awarding points.