Hello,
I have an interesting one here. In the process of building my new VM deployment workflow, I have run into a snag. You need to declare a VM folder for any new VMs being created. I want to get a VMfolder based on ESXi host and/or cluster or the full path to the VM folder (/vm/site1/servers/critical).
I know VMfolders are actually part of the VC/VM and not host/cluster but, is there a way to work backwards.
The don'ts:
- Do not want to use configuration items (too clumsy for maintaining)
- Do not want to dump all the VC folders into an array, then have to cycle through all of them looking for which one has the specific path
- Too time consuming in larger deployments
- Cannot use a VM and look for a folder from that perspective as the folder might be empty of VMs and since this is a VM deployment, you cannot use the existing one you need to deploy (chicken egg)
I think I already know what the answer is going to be but maybe someone has a bright idea on this one.
Thanks
B