vHerseyVMware

Set Up DPM and Use vCenter Scheduled Task to Turn DPM Off and On

VMware Power Management or Distributed Power Management (DPM) powers down hosts when resources are not needed and powers the host on as the demand for resources increases. This feature has the potential to provide significant savings in power and cooling especially in a large cluster.

I recently implemented DPM on the VMware Lab at TCC, a 12 host cluster that is only utilized a couple nights a week for classes. When hosts are idle DPM powers them down (Standby Mode) and then powers them up during class times as student access VMs requiring additional cluster resources. With DPM enabled there are usually only 2 or 3 of the 12 hosts powered on outside of class hours when there is very little resource consumption . This greatly reduces the load on the UPS and the heat in the TCC server closet room.

After successfully getting DPM working in the school lab and a bit of testing I decided to set it up on my production environment. One difference between the school lab and the production environment (besides the size – 4 host instead of 12) is that I want ensure all of my host resources are available during business hours. I do not want to have to wait for hosts to power on when resources are needed especially at the start of the business day. This can be accomplished by configuring DPM and then setting up a vCenter Scheduled task to turn DPM off and on.

Configuring a host to use DPM
The Power Management configuration has to be done on each host in the cluster where DPM will be enabled. For each host you will need the username and password for iLO access, IP address of the iLO interface, and the MAC address of the iLO interface. The iLO user needs to configured with permission to power on/off the host.

Once Power Management on the host has been configured it should be tested to ensure vCenter can put each host into and recover each host from Standby Mode. Test this by right-clicking on the host and selecting Standby Mode. If Power Management configurations are correct (and DRS is configured to be Fully Automated) VMs will migrate to other host in the cluster and the selected host should enter Standby Mode.

When the host is in Standby Mode right-click the host and select Power On to bring it back online.

If all is well the host will boot and return to a powered on state. I am using HP’s iLO and can see the power off and on request in the iLO log.

Check the Host tab for the cluster to view the date and time a host last exited standby.

Enable DPM on the Cluster
To use DPM VMware DRS must be enabled on the cluster and it should be set to Fully Automated (VMs will need to vMotion off of a host going into Standby Mode). Configuring VMware DPM is similar to setting up DRS. Right-click on your cluster and select Edit Settings. If DRS is not enabled Power Management options for the cluster will not be available.

Power Management can be configured for Off, Manual, and Automatic and the threshold slider can be adjusted from Agressive to Conservative. Setting Power Management to manual is useful when testing since DPM will make recommendations based on the threshold setting for the cluster but will not automatically apply the recommendations. DPM recommendations can be viewed on the DRS tab for the cluster. Check the VMware vSphere Resource Management Guide for more detail on the threshold settings.

If there are host in your cluster that you do not want managed by DPM (or to be managed differently from the default settings) then DPM setting for individual hosts can be configured in Host Options. For example I have DPM disabled for one of my host so that I want to always remain powered on. This can also be useful if you have hosts in your cluster without an iLO interface (or WOL support) or if a host will not successfully power on from standby, you can still leverage DPM by just disabling it on hosts that an incompatible or experience issues.

Change DPM Settings with a vCenter Scheduled Task
Enabling or disabling DPM settings on the cluster can be done with using a vCenter Scheduled Task – Change cluster power settings.

I created two tasks, one that enables DPM at the close of business and another that disables it one hour before start of business. Turning off DPM with the scheduled task automatically powers on any host that has been placed in Standby Mode.

At close of business my DPM ON scheduled task runs and sends me an email. Shortly after 2 of my 4 host enter Standby mode. I scheduled the DPM OFF task to run an hour before start of business so DRS has a chance to balance the load across all hosts once they are powered back on. In the morning my DPM OFF scheduled tasks runs, I get an email, and all the host in standby power on.

Not a huge power savings in my small environment but there is a small decrease in the load on my UPS and an estimated increase of about 10 minutes of UPS runtime during off hours when DPM is running and the host are in standby. Again not any huge savings for my environment, but sometimes every little bit helps so I am going to leave it configured for as long as it is not causing issues.

Here are a few links to some VMware DPM resources:

One thought on “Set Up DPM and Use vCenter Scheduled Task to Turn DPM Off and On

Leave a Reply

Your email address will not be published. Required fields are marked *

two × four =