Hello everyone, I am having a dilemma here.
I currently have
Cloud_vSphere_Machine_1:
type: Cloud.vSphere.Machine
properties:
constraints:
- tag: ${input.Datacenter}
name: ${input.customName}${input.VMcount}${input.Datacenter}
When I do a test it appends a very long identifier
Example
customname=test
Vmcount=1
datacenter=us
the name for the VM becomes test1us-mcm####-######
Is there a way that I can remove this ? and just follow the inputs I have on the name?
I have tried adding a new naming template for resource type machine with just ${resource.name} but it's giving me an invalid pattern
Thanks in advance
Hello!
Unfortunately not possible at the moment -> https://communities.vmware.com/t5/vRealize-Automation-Tools/Disable-Custom-Names/m-p/2917734
Regards,
Robert
Re-installing doesn't seem to help
Sorry I didn't see this thread and I responded in the other one linked in this message. I don't have an environment I can test in but I think an extensibility set on the machine provisioning pre event you can likely override this. I am just boggled by the decisions VMware makes sometimes it's like they are in a bubble. For those of us trying to use vRA on top of some long established ways of managing our virtual environments changes like this can break all sorts of things. Regardless of whether its a best practices sort of thing and something we should embrace this will not be well received by many.
@justaregulardud
here is the sample screenshot
Add this to your Project
and in Cloud template Yaml you give this .
name: ${self.resourceName}
@Ankush11s this still won't work for us as it forces adding the numbers at the end. So far as I know with the new naming systems it always forces a numerical value which we've never enforced in our environment. If we want to make things unique we have other ways of doing so and we will generate a uuid or something along those lines. The fact that this is forced is a bug in my opinion.
I shared solution considering your thread which says you do not want to have MCM##
@qc4vmware If you do not want any number in last and want custom name based on business logic , you need to use subscription
and generate the business logic in ABX or vro workflow .
Have a look at below for reference.
https://vmwarecode.com/2021/05/21/how-to-change-the-ip-address-and-rename-of-vm-in-vra-8/
Thank you for the information on overriding the resource naming template. My opinion is that VMware introduced a bug in the way this was implemented. I'm a decent vRA / vRO user and it is not a problem to implement this as an extendibility step but I find it confusing to operations staff and often to VMware support folk when we override this kind of out of the box feature. It was one less thing I had to use extensibility for... until now. We did something similar to this in vRA 6/7 lines of products and hit some bugs with race conditions related to some steps having run with the automatically generated name and the desired final name not getting applied until a bit later down the line. Hopefully we will not run into any similar issues in vRA 8. I don't think so judging by how things have been flowing thus far but it just seems unnecessary to support this naming convention... especially since it has worked just fine until now.