On-Demand CPU Count Change for Virtual Machines with vRA
Use Case
The goal is to allow users to increase or decrease CPU count of their virtual machines (VMs) on-demand using vRA, with backend automation handled by vRO.
High-Level Workflow
-
User Request in vRA
-
User selects the VM and specifies the new vCPU count (increase or decrease).
-
-
vRO Workflow Triggered
-
vRA Event Broker or Day-2 Action calls the vRO workflow.
-
-
Workflow Steps in vRO
-
Find the VM in vCenter via API.
-
Check Power Status:
-
If Powered On → Check if CPU Hot-Add is enabled.
-
If enabled → Update CPU count live.
-
If not enabled → Shutdown VM, apply changes.
-
-
-
Apply the requested vCPU change.
-
If VM was shutdown → Power it back on.
-
-
Status Update
-
Workflow updates back to vRA, showing success/failure status
Flow Diagram
Benefits
Self-Service – Users can request CPU changes anytime without admin involvement.
Non-Disruptive – If hot-add is enabled, CPUs are added while VM is powered on.
Governance – All changes tracked and controlled via vRA catalog.
Consistency – Automated workflow ensures correct process is followed every time.
vmName (string)Workflow Design in vRO
-
Inputs:
-
vmName(string) -
targetCpuCount(number)
-
-
Scriptable Task: Paste the above code.
-
Outputs:
-
statusMessage(string) → For logging back to vRA.
-
-
Event Subscription / Day-2 Action in vRA:
-
Bind inputs (VM name + requested CPU count) from vRA catalog request.
-
Show output in request status.
-

Comments
Post a Comment