Often there are situations where we want to automate the name generation of the VMs and There are multiple ways to do that in VRA.
We can use Machine Prefix feature which is inbuilt in VRA . we can navigate to Portal by below
Infrastructure => Compute Resources => Machine Prefixes
Before start the VRO part lets complete the pre-requisite for VRA /VRO configuration .
- Click on Blueprint and click on custom property tab and add the below properties as in the screenshot .
- Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.Requested value must be * .
- VMNewName value must be blank .
- Down the package from above and unzip the package .
- Open VRO legacy Client .
Once VRO client is open , Change the view to Design and Import Package.
Choose the File which we download from above step.
Click open and Import the package certificate .
Select All files while importing.
- Click Import selected elements
- Once done we should be able to see the VMwareCode folder and Rename VM workflow.
- Click on Rename VM workflow and click on edit
- Click on Not SET for Host which is highlighted and choose the IAAS host from VRA plugin.
- Click Select and Save and close and continue anyway — This step is required to get the value of VM and update the value
- VRO configuration is done , Now lets configure the subscription in VRA.
- To Configure the subscription login to vra and click on Administrator => Events => Subscription.
- Click on New Subscription and choose the Machine Provisioning.
- Click Next and Choose based on condition.
- Click Next and Choose the workflow which we created in above step.
- Click Next and choose the option for priority and blocking , Blocking means If workflow fails it will stop there and build will mark as failed.
- Now Last step is left to create/edit the custom form for blueprint .
- Go to the blueprint and click on custom form .
- We will see the NewVMName field under the vSphere Machine section.
Once Done we are good to Test with provisioning
Note: I have choose HOST option also in my form which may not be available for you as this require separate configuration.
Here is the result of test provisioning.