VMware Cloud Community
zebduin
Enthusiast
Enthusiast
Jump to solution

creating and assigning tags in vCenter through vCO

VMware is moving away from custom attributes and toward the categories and tags.  currently vCO has vCenter workflows for creating custom attributes, however, I have not found anything on automating the creation and assignment of tags with virtual machines.

ultimately, I would like to specify the category via vCAC at time of provisioning.  tag could be billing dept. and the response either if tag exists (ie Engineering) then it would associate the tag (engineering) to the category (billing dept).  However if the tag doesn't exist, then a new tag would be created and associated to the VM.

thoughts?

PowerShell commands

Since VMware PowerCLI version 5.5R1 and up there are a number of commands available to work with tags, such as:

  • Get-Tag
  • New-TagAssignment
0 Kudos
1 Solution

Accepted Solutions
qc4vmware
Virtuoso
Virtuoso
Jump to solution

I had some similar questions regarding the tags quite a while back (around the time 5.1 was released).  I don't think I ever got a response.  In the mean time you could create a wrapper for the PowerCLI commands or make the calls directly to the api.  Kinda messy but it would work.

View solution in original post

0 Kudos
4 Replies
qc4vmware
Virtuoso
Virtuoso
Jump to solution

I had some similar questions regarding the tags quite a while back (around the time 5.1 was released).  I don't think I ever got a response.  In the mean time you could create a wrapper for the PowerCLI commands or make the calls directly to the api.  Kinda messy but it would work.

0 Kudos
ivand
VMware Employee
VMware Employee
Jump to solution

Yes, vCO doesn't have specific content to manage tags on managed object. It is still shown as experimental. Unfortunately, PowerCLI is right choice here, at least for now.

Goran75
Contributor
Contributor
Jump to solution

Hi,

can you please provide some example or more detailed info how to wrap PowerCLI command for tagging in vCO?

Thank you

Goran

0 Kudos
Mnemonic
Enthusiast
Enthusiast
Jump to solution

There is now. I wrote a short article about how to do this.

https://vm.knutsson.it/2017/01/assigning-vcenter-tags-using-vrealize-orchestrator/

0 Kudos