Has anyone found / know of a vCO equivalent to the following PowerCLI command:
Get-View -ViewType VirtualMachine -Filter @{"Config.Template"="True"}
I've tried using the VcSdkConnection.getAllVirtualMachines() method, but all I'm able to do is return all VMs and then loop through each of them to test if config.template = true which can take several minutes.
Thanks,
Deric
Hi!
The good: It should be possible, by appending a filter to the getAllVIrtualMachines()-method
The bad: I don't know how... (maybe sneaking into the JAVA toolkit may help, Steve Jin ' s book about the vSphere SDK is a great start)
The ugly: no information by anybody in Orchestrator yet (see also my question in http://communities.vmware.com/message/1607625 )
Cheers,
Joerg
Hi Deric,
it looks like that in PowerCLI a simplified PropertyFilterSpec and XPath is used. I will build a PropertyFilter for this, but this will take a little time (i have to learn it for myself ). The initial hint i found in (page 20).
I'll be back soon...
-
don't forget: award points to helpful answers
Hey Andreas,
thanks for looking into this. I was under the impression that the PropertyFilter was actually applying a filter to each result, as in, return the following fields for each result instead of filtering the results set based on the PropertyFilter. So instead of returning just the results that matched the filter, it would instead return all the results, but only the properties of each result that matched the filter.
Hi Crago,
I just post Joerg (http://communities.vmware.com/thread/284052?tstart=0) about my expiriences so far. Just follow the link so you can read what Joerg has found. Unfortunately the results are very unsatisfactory :smileycry:.
Regards, Andreas