3 Replies Latest reply on Jan 12, 2018 2:53 PM by daphnissov

    Trying to Add VM Tags Via vRO Workflow

    nateconehealth Lurker

      UPDATE: Just realized that for the property (vRA.Deployment.Tags) I only have the tag name entered in the Value column for the dropdown. Do I need to add a way to reference the tag category? Not sure how to add that to the property.

      UPDATE 2: Doesn't look like the workflow requires a tag category. I'm trying to force the workflow to give me more information in the logs, see at what step it's failing.

      UPDATE 3: Found the issue, but not sure how to fix it. So the issue is that in the Variables section of the last run of the setVcTags workflow, I can see the following:

      vmName: (here it gives the correct VM name)

      errorCode: "Could not find VM (Dynamic Script Module name : findVcVmByName#7)"

      Because the result of vmName isn't getting properly passed to the vm attribute (type: VC:VirtualMachine), or at least it can't find it based off that name, the workflow ends.

      I may end up opening a ticket with VMware to see why it's not getting passed properly.

       

      Hey everybody,

      Novice vRO user here (yaaaay) - so I've been tasked with having vRA assign 1 of 2 tags to every single VM when it's being created (for these examples, "Backup Tag 1" and "Backup Tag 2"). We're doing this to enable auto backups in Avamar.

      Here's the site that I've been using: Assigning vCenter tags using vRealize Orchestrator – The vGoodie-bag

      So far I have:

       

      1. In vRO client, run "Import vAPI metamodel" successfully.
      2. Imported this package: vCenterTagging/com.vGoodie-Bag.library.vapi.package at master · KnutssonDevelopment/vCenterTagging · GitHub
      3. Went to the setVcTags workflow in vRO (vGoodie-Bag > setVcTags) > edit > endpoint > changed to "https://[my vCenter FQDN]/api"
      4. Created property "vRA.Deployment.Tags" as a dropdown (X = Backup Tag 1, Y = Backup Tag 2) and added it to the Blueprint.
      5. (I already have a LifeCycle Property Group with pretty much all the "VMPSMasterWorkflow32" entries, plus two "CloneWorkflow" ones, so just made sure that was in the Blueprint as well.)
      6. Created a new Subscription: setVcTags > Machine provisioning > Lifecycle state name = "VMPSMasterWorkflow32.MachineActivated" > State phase = "POST" > selected the "setVcTags" workflow from the imported package > Finish
        1. NOTE: This is one of the steps where I got confused, since they mention sorting workflows in vRO but don't give any information at all - I'm assuming the fact that I chose a state phase when creating the subscription means I'm good?

       

      Now when I build a VM in vRA, it successfully builds, and after a while vRO says that the setVcTags workflow ran successfully (under Logs it has two messages - "Settings vCenter Tags" and then "Tags: Backup Tag 1") - however, no Tags appear in vCenter for that VM.

       

      I'm assuming I'm just missing something with how I've set this up in vRO - obviously vRA is calling the workflow because I see it running, but nothing's making it back to the VM. Maybe I haven't tied in the right action at the end of the workflow or something? I'm really sorry if I've missed something obvious, this is my second time trying any serious workflow, and the first one I'm piecing together myself.

       

      Let me know if any other info is helpful, and I would love any suggestions of what to check next. Thanks!