Is there any way to determine which attributes in, say, a VM, are actually searchable?
Let's say I want to find a VM using the hostname of the guest OS (eg hostname). The following does NOT work:
Server.findAllForType("Vc:virtualMachine","xpath:guest.HostName='host.name'")
Whereas this does:
Server.findAllForType("Vc:virtualMachine","xpath:name='hostname'")
I have a feeling that the type of property (eg simple String versus something inherited from a VMware class) is relevant, but I've never seen an actual explanation.
I also know that there are ways to retrieve this through the VMware search service but that sounds like a lot more work, and slower code.