Home > vCloud Automation Center > Setting the Machine Name of a vCAC-provisioned VM to comply with a Corporate Standard – Part 4 of 4

Setting the Machine Name of a vCAC-provisioned VM to comply with a Corporate Standard – Part 4 of 4

03/17/2014

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

  1. Navigate to Infrastructure/Blueprints/Build Profiles
  2. Create a new or edit an existing Build profile
  3. From the “Add from Property Set”, select the appropriate “VMware*” property set for your O/S.
  4. Save the updated Build Profile
  5. Edit your vSphere Clone or Linked-Clone Blueprint
  6. Confirm that the selected machine prefix is set to “Use Group Default” or is appropriateBlueprint Information
  7. Check the correct Build Profile for the Blueprint’s O/S. The objective here is to ensure the “VMware.VirtualCenter.OperatingSystem” property is set.
  8. 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

    BlueprintProperties

  9. 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

Advertisements
%d bloggers like this: