community.vmware
community.vmware copied to clipboard
How to find a guest on many linked mode vcenters?
SUMMARY
My company has many vcenters, all connected on liked mode. This way, from a single vcenter web interface, I can search for a guest and it will be found, no matter on which vcenter it is hosted.
Is there a way to use vmware_guest_find (or other component) to use a single vcenter on 'hostname' parameter and search across all linked vcenter?
ISSUE TYPE
- Documentation Report
COMPONENT NAME
community.vmware.vmware_guest_find
ANSIBLE VERSION
2.12
Files identified in the description: None
If these files are inaccurate, please update the component name section of the description or use the !component bot command.
I don't think any of our modules works with linked vCenters. I think the vCenter API doesn't even allow to search for objects in linked vCenters.
The only solution I see at the moment is to iterate over all your vCenters. Bonus: Works even for vCenters that are not linked.
On powercli, you first have to make connect on each vcenter. Then, do a search on only one of them and this way the guest is searched and find across all vcenters. Nothing similar, I guess, right? So, should I open a new feature request?
I don't find a way to implement this in the official vSphere API, so I'll close this issue for now.
I'm sorry, but we can't implement what the API doesn't support. BTW: PowerCLI is special because it's from VMware and seems to use (some) private / undocumented APIs.