I am writing a simple app in C# to request all the hosts and their vms from Virtual Center 2.
It currently fetches all the hosts like this
pspec.type = "HostSystem";
pspec.pathSet = new string[] { "summary", "vm" };
I then have an array of morefs to all the vms hosted on each host.
All I really want from each host is contained in the summary. All I want from each vm is their ipaddress.
2 Questions
1. Is there a more efficient way to obtain this info? I.E. get all the hosts and vms (with ipaddresses) in a single retrieve operation.
2. Given the vms moref how do I request its GuestInfo (ipaddress)?