How to restrict DRS virtual machine migrations to specific time windows.
search cancel

How to restrict DRS virtual machine migrations to specific time windows.

book

Article ID: 447029

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This article describes how to change the vSphere DRS Automation Level and Migration Threshold by creating scheduled tasks. It outlines the steps to restrict DRS-initiated vMotion to off-peak hours using scheduled tasks, minimizing vMotion operations during peak business hours.

Environment

VMware vCenter Server

Resolution

You can allow DRS to actively perform migrations during a specific time window by using the Schedule DRS feature to modify the Automation Level or Migration Threshold from the configuration screen:

  1. In the vSphere Client, navigate to the cluster.
  2. Click the Configure tab, and then click Services.
  3. Under vSphere DRS, click the Schedule DRS button.

Configuration Examples

Example 1: Toggle Automation Level

This method switches DRS between Fully Automated (where it actively performs migrations) and Partially Automated (where it only provides recommendations) at your desired times.

  • Create a scheduled task (e.g., every Saturday at 00:00 AM) to set the Automation Level to Fully Automated with the Migration Threshold at 3.
  • Create a second scheduled task (e.g., every Saturday at 03:00 AM) to set the Automation Level to Partially Automated (with the Migration Threshold at 3).
  • DRS will only execute automatic vMotion migrations during the 3-hour window.

Example 2: Toggle Migration Threshold

This method keeps DRS in Fully Automated mode but adjusts the sensitivity of the threshold to concentrate migrations within your preferred window and minimize them outside of it.

  • Create a scheduled task (e.g., every Saturday at 00:00 AM) to set the Automation Level to Fully Automated and the Migration Threshold to 4 (More Aggressive).
  • Create a second scheduled task (e.g., every Saturday at 03:00 AM) to set the Automation Level to Fully Automated and the Migration Threshold to 1 (Most Conservative).
  • DRS remains fully automated. It will aggressively perform migrations during the 3-hour window, but will rarely migrate workloads outside of that window.

Additional Information

Depending on the products integrated with your vSphere environment, disabling DRS or setting it to Manual may not be supported or allowed. Please note that the following are only a few examples, and other integrated software, solutions, or third-party products may also have similar strict DRS configuration requirements.

VMware Cloud Director:
To successfully power on virtual machines from VMware Cloud Director, the DRS Automation Level must be configured to either Fully Automated or Partially Automated.

vSphere Supervisor:
To deploy and utilize vSphere Supervisor, the DRS Automation Level must be set to Fully Automated.