-
1. Re: Way to list number of VMs deployed from a specific template image?
daphnissov Aug 12, 2019 6:49 PM (in response to darrenoid)I'm pretty sure that you can gather this from vrealize operations using the VRA management pack.
-
2. Re: Way to list number of VMs deployed from a specific template image?
bdamian Nov 12, 2019 6:33 AM (in response to darrenoid)I have a weird work around.
You can use the IaaS API but, you will get information about existing VMs (not deleted vms). And, you cannot filter the query using a custom property value.
So, if you can narrow the search using dates (maybe VMs created last week) this could help you:
Method: GET (with NTLM authentication)
Headers: Accept: application/json
URL:
https://{IaaS host}/repository/Data/ManagementModelEntities.svc/VirtualMachines()/?$filter=(IsDeleted%20eq%20false)%20and%20(IsManaged%20eq%20true)&$expand=VirtualMachineProperties
IsManaged eq true -> means only managed by vRA (you can imagine other filters using the attributes of the response)
expand=VirtualMachineProperties -> retrieve custom properties
You can browse the response, every VM will have all Custom Properties and you can find one with name "__clonefrom". The value will be the name of the template.
Hope this helps.
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
-
3. Re: Way to list number of VMs deployed from a specific template image?
darrenoid Aug 16, 2019 10:49 AM (in response to bdamian)Thanks for the tips. We may try out vRealize Operations soon, but for now the IaaS API seems promising for this. I found an example vRO action that I am playing with now to see if it will work:
Find all VMs with a particular property value in vRA · GitHub
It would be nice to also get data on past deleted VMs.