'VM vMotion initially succeeds but then fails with task message "DRS Constraint Violation" in NSX environment'
search cancel

'VM vMotion initially succeeds but then fails with task message "DRS Constraint Violation" in NSX environment'

book

Article ID: 392697

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Powered-on virtual machines may fail to successfully migrate to a newly added ESXi host within a cluster in vSphere environments with NSX integration. The migration may also initially succeed, but them automatically migrate back to the original host within seconds. This issue specifically affects powered-on VMs, while powered-off VMs can be migrated successfully.

The following symptoms may be observed:

  • Successful initial vMotion of powered-on VMs to a new host
  • Immediate migration back to the original host
  • Tasks view shows the message "DRS constraint violations"
  • ESX Agent Manager shows errors related to agent VMs

Environment

  • vCenter Server 7.0.3
  • ESXi hosts 7.0.3
  • NSX (particularly affects environments with NSX-V)
  • DRS enabled clusters (set to Fully Automated)
  • Environments using Guest Introspection services

Cause

This issue occurs due to one or more of the following conditions:

  1. ESX Agent Manager (EAM) is attempting to deploy NSX Guest Introspection VMs on the new host but fails due to:

    • Missing or inaccessible datastores referenced in the agent configuration
    • NSX Manager disconnected from vCenter Server
    • Stale datastore references in the NSX configuration
  2. DRS enforces a constraint that prevents VMs from running on hosts without the required agent VMs deployed ("InsufficientAgentVmsDeployed" errors)

Resolution

Follow these steps to resolve the VM migration issue:

  1. Check ESX Agent Manager for errors:

    1. Navigate to vCenter Server > Menu > Administration > vCenter Server Extensions

    2. Select vSphere ESX Agent Manager > Configure

    3. Look for agency errors, particularly related to Guest Introspection

  2. Check for missing datastore errors:

    1. In the ESX Agent Manager, look for errors like "Agent datastore(s) not available on host"

    2. Verify that all datastores referenced in the agent configuration are accessible to the new host

  3. If the NSX Manager is disconnected from vCenter:

    1. Connect to NSX Manager admin interface

    2. Re-register the NSX Manager with vCenter

    3. Verify successful connection between components

  4. For Guest Introspection issues:

    1. If Guest Introspection is no longer needed, consider removing the deployment

    2. If needed, reconfigure Guest Introspection with correct datastore references

    3. Try resolving issues from NSX > NSX Service Deployment > Guest Introspection

  5. After resolving the agent deployment issues, test VM migration again

Additional Information

  • This issue is more common in environments that have undergone storage changes or where datastores referenced by NSX components are no longer available
  • Upgrading to newer versions of vSphere and NSX can help prevent these issues
  • For environments that no longer require Guest Introspection, removing the service can eliminate these migration constraints