Datasheet
28 CHAPTER 1
•
AUTOMATING VCENTER SERVER DEPLOYMENT AND CONFIGURATION
LISTING 1.8
Enabling HA with a failover host level and Restart Priority on a new cluster
$ProductionCluster = New-Cluster `
-Location $BostonDC `
-Name “Production” `
-HAEnabled -HAAdmissionControlEnabled `
-HAFailoverLevel 1 `
-HARestartPriority “Medium”
To complete this same action on an existing cluster, you rst need to retrieve the
cluster as an object and then push it down the pipeline into the
Set-Cluster
cmdlet, as shown in Listing 1.9.
LISTING 1.9
Enabling HA with a failover host level and restart priority on an existing cluster
Get-Cluster `
-Location $BostonDC `
-Name “Production” | `
Set-Cluster -HAEnabled $true `
-HAAdmissionControlEnabled $true `
-HAFailoverLevel 1 `
-HARestartPriority “Medium”
Configuring Distributed Resource Scheduler
VMware DRS is a con guration made at the cluster level of the vCenter Server envi-
ronment that balances VM workloads with available host resources. With VMware
DRS, you are able to de ne the rules for allocation of physical resources among
the VMs. DRS can be con gured for manual or automatic control. If the workload
on one or more VMs drastically changes, DRS redistributes the VMs among the
physical servers to ensure the resources are available where needed. Much like HA,
DRS can be con gured as part of the initial cluster setup or as an alteration to an
existing cluster object. For example, to con gure a new
Production
cluster with
DRS enabled and a DRS automation level of
FullyAutomated
with
DRSMode
set to
FullyAutomated
, you would use the code in Listing 1.10.
LISTING 1.10
Confi guring DRS on a new cluster
$ProductionCluster = New-Cluster “Production” `
-DrsEnabled `
-DrsAutomationLevel “FullyAutomated” `
-DrsMode “FullyAutomated”
890790c01.indd 28890790c01.indd 28 3/3/11 10:22:16 AM3/3/11 10:22:16 AM