VMware Cloud Community
paurgie
Contributor
Contributor
Jump to solution

Tagging through vRO

Does anyone out there use vRO to assign tags to VMs, or anything really?  What methods are you using successfully?

Here's my issue - We use a provisioning workflow to create our VMs.  At the end of that workflow are a couple of tag assignments, using tags/categories I've created to define a VM owner, among other things.  Since there aren't, or weren't, any tagging workflows out of the box, I use a powershell script on a powershell plugin windows VM.  This has been failing for the last 6 months or so, for unknown reasons.  My script fails in odd ways mid-script, but it works fine when run manually so it's a real bear to debug.  The script is really pretty simple, I think it's 10 lines or less, and the logic is sound, due to being able to run it with the same command line that vRO runs.  I think it could be CredSSP that's failing on me but I'd really like to get away from the chain of tools it takes to get this one little piece working properly.

TIA

Reply
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Tagging functionality is not supported by vRO vCenter plug-in because the corresponding vCenter APIs are part of the public vCenter SOAP API.

There is another vRO plug-in - vAPI plug-in - that supports the newer vCenter APIs exposed via vAPI, including the tagging API. The plug-in also contains some sample workflows related to tagging operations that you can use as a starting point.

If you don't want to use vAPI plug-in, another option would be to call the corresponding tagging vAPI using HTTP-REST plug-in.

View solution in original post

Reply
0 Kudos
6 Replies
daphnissov
Immortal
Immortal
Jump to solution

Are you using vRO in tandem with vRA here, or just naked vRO?

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

Tagging functionality is not supported by vRO vCenter plug-in because the corresponding vCenter APIs are part of the public vCenter SOAP API.

There is another vRO plug-in - vAPI plug-in - that supports the newer vCenter APIs exposed via vAPI, including the tagging API. The plug-in also contains some sample workflows related to tagging operations that you can use as a starting point.

If you don't want to use vAPI plug-in, another option would be to call the corresponding tagging vAPI using HTTP-REST plug-in.

Reply
0 Kudos
paurgie
Contributor
Contributor
Jump to solution

It's just the bare vRO, no vRA here

Reply
0 Kudos
paurgie
Contributor
Contributor
Jump to solution

Thanks for the pointer, knowing the right direction seems to be yielding some better searches Smiley Happy

I came across this article which seems to be exactly my need - https://vm.knutsson.it/2017/01/assigning-vcenter-tags-using-vrealize-orchestrator/

Once I get done pushing out the new 7.6 appliance I'll be jumping down the vAPI rabbit hole and see if I find anything useful at the bottom.

Reply
0 Kudos
eoinbyrne
Expert
Expert
Jump to solution

FWIW - I've done VC tagging using REST calls to the CIS API where VC is managed as a RESTHost in vRO

It works pretty well and the API docs are pretty straightforward. I tried the VAPI plugin but could not find any documentation to explain how to use it and also could not make much sense of the API classes.

CIS API ref is here - CIS (Management) API - VMware API Explorer - VMware {code}

There's a sample of the REST calls you need from Christophe - https://code.vmware.com/samples/1437/vro-vcenter-6-tagging-plug-in#

Anyway, HTH

Reply
0 Kudos
paurgie
Contributor
Contributor
Jump to solution

I ended up going with the VAPI... pretty easy once I deconstructed some examples.

I did find that the 7.6 vRO is absolute crap though, I really hope these aren't permanent choices

- can't use groups for workflow permissions when vSphere auth'd, need VRA

- web client is garbage currently, navigation through the library is tough, building a workflow looked even tougher.

Reply
0 Kudos