Hello,
I am attempting to get a collection of HostSystem objects in a specific cluster using the VMware.Vim
API that comes with PowerCLI 6. I can retrieve the cluster by doing:
var clusters = client.FindEntityViews(typeof(ClusterComputeResource), null, null, null).Cast<ClusterComputeResource>();
For each of these clusters, I can inspect the Host property to get an array of MoRef's that point to each host in the cluster. However, when attempting to retrieve the hosts using:
var hosts = client.GetViewsByMorefs(cluster.Host, "Name", "Summary", "Vm").Cast<HostSystem>();
An exception is thrown:
Required parameter specSet is missing while parsing call information for method RetrieveProperties at line 1, column 218 while parsing SOAP body at line 1, column 207 while parsing SOAP envelope at line 1, column 38
I have tried both with and without specifiying the params string[] properties
parameter specified, but I get the same result either way. Is there something I'm missing?
I have also tried past versions of the library (5.5 and 5.0), and encounter the same problem.
Thanks!