I often get asked for some ideas outside of the usual in which hooking vCO into vCAC stubs provide a practical application. Our standard examples of this include IPAM and CMDB hooks, but sometimes the same old examples get a little old. This one I’m quite proud of, even if it required significant assistance from both Eric Hardcastle and Nathan Wheat. So here you go – VM placement for a vSphere Metro Storage Cluster as managed during vCAC provisioning.

When using vMSC, there is no concept of “location” that vCAC can grab hold of, so we need to make sure that when a machine is deployed, it is added to the appropriate DRS Rules for VM to Host Affinity – rules that I hope everyone who uses vMSC have configured.

Rather than assuming you have everything you need up and ready to run, let’s begin at the beginning.

Adding vCO as an Endpoint

1. Login to vCAC, and navigate to Infrastructure > Endpoints and select New Endpoint > Orchestration > vCenter Orchestrator.

Orchestrator Endpoint

2. Enter your vCO endpoint details, select a set of credentials (or create a new set within the dialog) and add the Custom Property as shown below. If you don’t do this you will get an error message when you click OK and nothing will happen.

vCO Details

3. Click OK and you’re ready to rock and roll – or at least move onto the next step.

 

Installing the vCO Customisation

This one is a piece of cake. There is an Orchestrator workflow that takes care of this for you.

1. Login to Orchestrator (I did this through the vSphere Web Client) and navigate to vCloud Automation Center > Extensibility > Installation > Install vCO Customisation and run the workflow.

Install vCO Customisation

2. You’ll be prompted for token delegation – this is normal.

SSO Token

3. Click on the green plus symbol, and then browse through the hierarchy per the second screenshot to get to your IaaS server.

vCAC Host

Select IaaS

4. Select the stubs that you want to enable.

Stubs

5. Finally, select the number of menu operations you want to create (additional Day 2 operations).

VM Menus

6. Select to Run the workflow now and click “Finish”.

Finish

7. After a couple of minutes, you will see the following.

Complete

 

Attaching the Workflow to the Appropriate Stub for your Blueprint

1. Choose the MachineProvisioned stub to enable on your Blueprint, then select a vCAC host (IaaS Server) by navigating the hierarchy per the second image.

Enable WF

 

Select IaaS

2. Click the “Insert” button to select the Blueprint to append the stub to.

Blueprint Selections

3. Navigate your hierarchy and select the appropriate Blueprint.

Hierarchy

Select Blueprint

4. Click in the check box so that vCAC properties can be passed through as values to vCAC, this is where you will select the Site that you want your workloads to be pinned to.

NewImage

5. In the filter, type DRS and then select the “Add virtual machine to DRS group”, and click the “Next” button.

vCO Workflow

6. Select the “Run Now” radio button and click “Finish”.

Run It

DRS Configuration

1. Here are my DRS Groups – I’m not going to take you through configuration of these, I’m assuming you know how to set this up.

DRS Groups

2. Ditto for my DRS rules to assign VM groups to Host Groups.

DRS Rules

Onto the final piece of the puzzle – the Blueprint config.

Blueprint Configuration

1. The following are appended to the Blueprint you selected above as part of the vCO workflow. I’ve changed the “Prompt User” value on the DRS Group Name property to yes.

Blueprint Properties

2. To make this more intuitive, we want that Custom Property to provide a drop down box, rather than being a free text field. So go ahead and copy ExternalWFStubs.MachineProvisioned.drsGroupName and then navigate to Infrastructure > Blueprints > Property Dictionary. The only one that must be exactly as I’ve shown is the Name. The rest you can alter, but make sure you tick the checkbox to make it a required field.

Custom Property

4. Edit the Property Attributes, Type should be ValueList and Value should be your DRS VM Group names.

Property Attribute

5. Ok, this is where the rubber hits the road – time to test this baby out! Here I am requesting the Blueprint (yes, this is different to the Blueprint screenshot I used above – sue me).

Test Run

6. To show the live feed, here is a screenshot from the C# client, and the Orchestrator log.

NewImage

 

NewImage

7. Finally, the end result.

Result

 

As mentioned at the beginning of this blog post, a huge shout out to Eric Hardcastle and Nathan Wheat – I’m sure there will soon be many more example vCO and vCAC integrations appearing on this blog. If you have any use cases you’d like to see tackled then please leave your comments below.

Finally, the vCO package is attached if you’d like to make use of it.

com.vmware.library.vcac.drs.package