Automating Tag Creation & Assignment to VMs with vRA + vRO
Use Case Summary
A user provisions a VM from vRA.
-
Once the VM is deployed in vCenter, a vRO workflow is triggered via Event Broker subscription.
-
The workflow:
-
Checks if the Tag exists (using REST API to NSX-T).
-
If not found, creates the Tag under the correct category.
-
Assigns the Tag to the newly provisioned VM.
-
This eliminates the need for manual intervention and ensures every VM is tagged correctly for policies, automation, and visibility.
High-Level Flow
-
VM Provisioning in vRA
-
User requests VM with required details (e.g., Environment, Owner, Application).
-
-
Event Broker Subscription
-
After provisioning, vRA triggers a vRO workflow.
-
-
vRO Workflow Actions
-
Connects to vCenter using REST API.
-
Checks if Tag exists.
-
If exists → Skip creation.
-
If not exists → Create new Tag under category.
-
-
Assigns Tag to the VM.
-
-
Result
-
VM is provisioned with the right tags automatically applied.
-
Flow Diagram Steps
-
Start VM Provisioning (Triggered in vRA)
-
Collect Input Parameters (VM Name, Tag Names, Owner, Environment, etc.)
-
Call vRO Workflow via vRA Event Broker
-
Check if Tag Exists in vCenter (REST API)
-
If Exists → Skip creation
-
If Not Exists → Create Tag under appropriate Category
-
-
Assign Tag(s) to VM
-
Log Results & Update CMDB/Tracking (Optional)
-
End
Flow Diagram
Demo
👉 Further Automation
If you need enhancements or additional automation features, feel free to reach out. HashtagForge

Comments
Post a Comment