Tuesday, September 22, 2009

Hmm...We need to reorganize our clusters

This isn't first time that growth has yielded a desire to repurpose or rename a cluster in my virtual environment (VI3.5 currently), but this is the first time I was determined to use Powershell to perform the task.

The goal? I need 2 clusters in an organization folder named "Production" of our Raleigh Datacenter with the names "Windows Cluster" and "Production Cluster". I already have a "Production Cluster" that is getting repurposed in the near future so it must be renamed. I will then need to create a new cluster and name it "Production Cluster" for our new production servers.

1. Log into PowrCLI and connected to my vCenter server with

Connect-VIServer -Server

2. Change the name of the current cluster "Production Cluster" to "Windows Cluster":

Get-Cluster
-Name "Production Cluster" | Set-Cluster -Name "Windows Cluster"

This requires user acceptance of the change. Just hit enter or type Y and enter to accept.

3. Create new cluster Named "Production Cluster" and enable DRS, HA, make DRS Fully Automatic, and set HA so that it will not power on VM if it will exceed resource availability limits.

Get-Datacenter -Name "Raleigh Datacenter" | Get-Folder -Name "Production" | New-Cluster -Name "Production Cluster" -DrsEnabled -HAEnabled -DrsAutomationLevel FullyAutomated -HAAdmissionControlEnabled

Hit enter and in a couple of moments you have a brand new Cluster named "Production Cluster" in the correct Datacenter and Organization folder with DRS and HA initially configured. Always a good idea to check your configurations, but all looked well.

Note: vSphere (ESX4) has additional features (VM Monitor and fully supported Power Management) to manage on your cluster. I will update this post once I get some testing on that environment.

No comments:

Post a Comment