DRS Migration Threshold Shows Inverted Value in PowerCLI Output Compared to UI
search cancel

DRS Migration Threshold Shows Inverted Value in PowerCLI Output Compared to UI

book

Article ID: 405405

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

When retrieving the DRS migration threshold using PowerCLI or directly via the vCenter API, the output appears to show a value opposite of what is configured in the vSphere UI. This article explains the correlation between the UI label and the numeric value returned by the API/CLI.

You may observe the following behavior:

  • DRS migration threshold is set to "Conservative (Less Frequent vMotions)" in the vSphere UI.

  • However, when queried via PowerCLI:

     
    Get-Cluster | Select Name, @{N="DRS Migration Threshold"; E={$_.ExtensionData.ConfigurationEx.DrsConfig.VmotionRate}}

    The result shows:

     
    VmotionRate = 5
     
  • Conversely, when the UI is set to "Aggressive (More Frequent vMotions)", the CLI shows:

VmotionRate = 1

Environment

vCenter Server 7.x, 8.x

Cause

This behavior is by design. The vCenter API uses a numeric scale from 1 to 5 to represent DRS migration aggressiveness. However, this scale is inverted compared to the labels shown in the UI.

Resolution

  • Your PowerCLI/API commands are functioning correctly.

  • The VmotionRate values are intentionally inverted between CLI and UI.

  • The PowerCLI and API return the raw integer value associated with the migration threshold.

  • A lower number (1) means more aggressive, and a higher number (5) means more conservative.

  • The vSphere UI simply reverses the scale to show the setting in a more human-readable form.

No corrective action is required — the observed behavior is expected and consistent with internal VMware API implementation.

This design choice allows the API to treat the migration aggressiveness as a linear scale (1 being max aggression, 5 being minimal), even though the UI uses a reversed visual model.