- Machine Prefix/Property Definition – Part 1
- Powershell – Part 2
- Workflow Configuration – Part 3
- Blueprint Update – Part 4
Review
In part 1, we configured the Machine Prefix, Property Dictionary and layout to accommodate our change. In part 2, we created and saved a powershell script to create the desired machine name from the inputs we provided. In part 3, we modified the Building Machine workflow stub to create and assign a new machine name. In this last part, we’ll finish by updating the blueprint and testing.
Recall that in Part 1, we created a Property Definition named “custom.machineRole” and a Property Layout named “machineRole.Selection”
Steps
- Navigate to Infrastructure/Blueprints/Build Profiles
- Create a new or edit an existing Build profile
- From the “Add from Property Set”, select the appropriate “VMware*” property set for your O/S.
- Save the updated Build Profile
- Edit your vSphere Clone or Linked-Clone Blueprint
- Confirm that the selected machine prefix is set to “Use Group Default” or is appropriate
- Check the correct Build Profile for the Blueprint’s O/S. The objective here is to ensure the “VMware.VirtualCenter.OperatingSystem” property is set.
- On the Properties page of the Blueprint settings, add the following Properties:
Name Value Prompt User Reason ExternalWFStubs.BuildingMachine No Execute the Workflow we’ve modified custom.machineRole Yes The name of our Property Definition VirtualMachine.Request.Layout machineRole.Selection No The Property Name indicates that a custom layout should be employed and the value is the name of our Property Layout - Click OK to save the blueprint
Testing
- Logon as a member of a Business Group that has an entitlement to the Blueprint we’ve worked on.
- When requesting a VM from the blueprint, the request form should include the “Role” dropdown list with your values
- The resulting request will include the “custom.machineRole” property set to the selected value
- If you left the “write” lines in the PS script, you can check the C:\Scripts\nametest.txt file on the IaaS Server to ensure the values are passed and set correctly
- Lastly, of course, check to see if the provisioned machine has the appropriate name
Once again…
You should visit Adam Bohle’s blog and his fantastic posts about this. He knows way more about it than I do. I stepped through his and Tom O’Rourke‘s procedures and wanted to document what it took. Those guys are the authority on vCAC.
References
Powershell Scripting out of vCAC
Easily change the name of a provisioned machine in vCloud Automation Center to conform with company naming conventions
Common LINQ Queries for vCAC
Add a new location to a Compute Resource