This document explains the logic to develop Tidal Enterprise Orchestrator workflow to automate the process of creating vCenter Resource Pool
* vSphere Power CLI must be installed either on the TEO server or vCenter
* vMA can also be used to achieve the same task
* Script execution must be enabled on the vCenter
* DRS must be enabled on the vCenter in order to create the Resource Pool
This workflow was build using TEO native Powershell activity. The vCLI snapin was used to execute the Power vCLI commands on the remote vCenter.
The powershell script is very simple
Add-PSSnapin VMware.VimAutomation.Core
Connect-VIServer -Server localhost -Protocol http
get-cluster
New-ResourcePool -Location $args[0] -Name $args[1]
exit
After creating the vCenter Resource Pool, the workflow also sets the CPU and Memory reservation values if provided as input. Otherwise, it takes the default values and create RP.
Add-PSSnapin VMware.VimAutomation.Core
Connect-VIServer -Server localhost -Protocol http
get-cluster
Set-ResourcePool -ResourcePool $args[0] -MemReservationMB $args[1]
Set-ResourcePool -ResourcePool $args[0] -CpuReservationMhz $args[2]
exit