VMware Cloud Community
StageCoach20111
Enthusiast
Enthusiast
Jump to solution

VCAC and virtual machine annotations

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
zebduin
Enthusiast
Enthusiast
Jump to solution

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
SkyCoop
VMware Employee
VMware Employee
Jump to solution

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.

admin
Immortal
Immortal
Jump to solution

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"

admin
Immortal
Immortal
Jump to solution

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

mesides77
Contributor
Contributor
Jump to solution

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? 

Reply
0 Kudos
chrisheartland
Enthusiast
Enthusiast
Jump to solution

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.

zebduin
Enthusiast
Enthusiast
Jump to solution

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.

rkollipalli
Contributor
Contributor
Jump to solution

Hi vJDuBB,

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

Reply
0 Kudos