In previous post we looked at how to manually enable Supervisor cluster on a vSphere cluster. Now we'll reproduce the same steps from GUI in a small script using PowerCLI.
PowerCLI 12.1.0 brought new cmdlets for VMware.VimAutomation.WorkloadManagement module and one of this is Enable-WMCluster. We will be using this cmdlet to enable Tanzu supervisor cluster. In the following example we'll be using NSX-T, but the cmdlet can be used with distributed switches.
The following script is very simple .First we need to connect to vCenter Server and NSX manager
Next we define the variables (all variable that were in the UI wizard).
The cluster where we enable Tanzu, the content library and the storage policies:
Management network info for Supervisor Cluster VMs
DNS and NTP servers
Tanzu details - size and external and internal IP subnets
One more parameter needs to be provided: Edge cluster ID. For this we use NSX-T manager connectivity and
Last thing is to put all the parameters together in the cmdlet and run it against the vSphere cluster object
And as simple as that, the cluster will be enabled (in a scripted and repeatable way).