Highlighted
Enthusiast
Enthusiast

VCAC and virtual machine annotations

Jump to solution

I am currently updating a set of custom annotations for each VM I create.  If I implement VCAC, can VCAC update these for me when it provisions a VM? 

1 Solution

Accepted Solutions
Highlighted
Enthusiast
Enthusiast

I have done this for a customer.  Presented several tag options for VM attributes via vCAC drop-downs options which matches tags set for each attribute set in vCenter - passed these values to a vCO workflow as input parameters and used them in a PowerCLI script via the PowerShell vCO Plugin.

The screenshot shows the powerCLI script I used to set 8 annotations on a provisioned VM.

View solution in original post

7 Replies
Highlighted
VMware Employee
VMware Employee

OOTB, vCAC only updates the vCAC Owner attribute, and if a description is provided in the machine request, that is passed in as well into the attributes of the VM. If you want to set additional custom attributes of the VM, the way I have accomplished this in the past, is modify the Machine Provisioned workflow stub in Design Center to call a vCO workflow (there is one that is included with the vCenter Plug-In) to pass in the attribute name and value of the custom attribute. If you have done this sort of thing before, it should be a trivial task, if you are new to the Workflow Designer and calling vCO, you could probably work through it reading some blog posts in an afternoon.

Highlighted
Immortal
Immortal

Try adding some of these custom properties on your blueprint or on your request where {0} is an index 1,2,3, .... N.  If these are changed in vC I don't believe vCAC will collect and update these.

"VMware.Attribute{0}.Name"

"VMware.Attribute{0}.Value"

Highlighted
Immortal
Immortal

FYI, i just tested this and it works but please note, you must go in order and the 0 must be the first attribute in the list.

You could use a property dictionary if you want to do some special validation and prompting.

  VMware.Attribute0.Name    NameOfAttribute

   VMware.Attribute0.Value    ValueOfAttribute

Highlighted
Contributor
Contributor

I was looking for a solution for this as well. pfleischer you solution worked great I just have one question that I was hoping you might be able to answer. We have dropdowns defined in the dictionary and I was wondering if a selection in the dropdown could be assigned to annotation. For example if we are deploying a server and the dropdown is ftp,web,ts or db and I would like that selection to be in the "application" attribute in the annotations for the VM. Do you know if that can be done? 

0 Kudos
Highlighted
Enthusiast
Enthusiast

I haven't put all of the pieces together, but you should be able to get the custom property in a variable and pass it to the 'add custom attribute to a virtual machine" workflow. So, something like this:

var custProp = vCACVmProperties.get("Custom.PropertyName")

Make custProp an output and send it to the "add custom attribute to a virtual machine" workflow.

Highlighted
Enthusiast
Enthusiast

I have done this for a customer.  Presented several tag options for VM attributes via vCAC drop-downs options which matches tags set for each attribute set in vCenter - passed these values to a vCO workflow as input parameters and used them in a PowerCLI script via the PowerShell vCO Plugin.

The screenshot shows the powerCLI script I used to set 8 annotations on a provisioned VM.

View solution in original post

Highlighted
Contributor
Contributor

Hi vJDuBB,

I am new to PowerCLI. Please help me to add PowerCLI End point to VCO.

0 Kudos