VM Naming - ID Numbering based on how many times a blueprint has been used


I've been working on this vRO workflow for custom hostnaming that considers the following requirements:

1. Tenant - e.g. Infrastructure is "inf", Shared Services is "sas"

2. Environment - e.g. Production is "prd", Development is "dev"

3. Application Team - e.g. Active Directory is "aad", Windows is "win"

4. VM Role - e.g. Web is "web", Database is "dbs"

5. ID/Numbering - e.g. 001-999

As an example, it would be like this: infprdaadweb001

Considering that, I'm required to create a workflow for it but I'm having a particular challenge in the numbering as it should be based on this condition:

When an instance is created, vRA/vRO will append an ID number to the VM prefix defined above (1-4). vRA/vRO will increment the ID number based on the number of times that the blueprint has been used, regardless of which facts the requestor selected (1-4) in the blueprint. For example, if a blueprint has been used 5 times with the same facts, the sixth machine created will be ID 06. But when the facts are changed, and a seventh machine is created, the ID will be 07, instead of looking to see if ID 01 is available.

If you can help share your inputs based on all conditions, including that I need to do this through a vRO workflow and that it needs to consider the blueprint number of uses for the numbering. Thanks in advance. If you need further info, pls let me know. Cheers!

0 Kudos
1 Reply

Something that is far, far simpler than rolling your own custom naming by coding in vRO is to use the SovLabs Custom Naming module. The scenario you're wanting to do, which is to maintain a unique sequence string for each combination of name factors, comes right out of the box. So in the module, you'd create a sequence, then you'd create a naming standard. You would put in custom properties around vRA that correspond to those that you want, then compose your naming standard like {{Prop1}}{{Prop2}}{{PropN}}{my.sequence} and it automatically assigns the name and increments the sequence correctly. No custom vRO coding required at all.

0 Kudos