HCX Migration fails at switchover with "vim.fault.DatacenterMismatch" due to incorrect manual folder selection
search cancel

HCX Migration fails at switchover with "vim.fault.DatacenterMismatch" due to incorrect manual folder selection

book

Article ID: 434030

calendar_today

Updated On:

Products

VMware HCX

Issue/Introduction

  • VM switchover fails even after successful data synchronization.
  • HCX Manager UI Error: 
    (vim.fault.DatacenterMismatch) { faultCause = null, faultMessage = null, invalidArgument = (vim.fault.Argument) [ (vim.fault.Argument) { dynamicType = null, dynamicProperty = null, entity = ManagedObjectReference: type = Folder, value = group-v29, serverGuid = null, inputDatacenter = ManagedObjectReference: type = Datacenter, value = datacenter-#, serverGuid = null } ], expectedDatacenter = ManagedObjectReference: type = Datacenter, value = datacenter-##, serverGuid = null }
    
  • The log specifies an inputDatacenter (the datacenter of the manually selected folder) that differs from the expectedDatacenter (the actual migration target).

Environment

VMware HCX

Cause

  • This issue occurs when a user manually selects a Destination Folder in the HCX Migration wizard that resides outside the target datacenter's boundary.
  • Additionally, editing the Mobility Group to remove or change the folder may fail to update the per-VM migration draft, causing HCX to continue searching for the previously configured (incorrect) folder path, while performing "Retry Migration".
  • Path to validate the Migration Configuration:
    HCX UI > Services > Migration > Edit Mobility Group > Transfer and Placement > Destination Folder


Resolution

  1. Identify Boundary: 
    Verify the target cluster's parent datacenter and ensure the destination folder is located within that specific datacenter.

  2. Cancel Active Migration: 
    For VMs stuck in "Waiting for maintenance" or "Failed", click Cancel to ensure a clean rollback HCX Bulk Migration canceled.

  3. Address Stale Configuration:
    • If editing the Mobility Group does not clear the old folder, delete the Mobility Group entirely after cancellation.
    • Create a New Mobility Group to ensure all draft configurations are refreshed.

  4. Correct Mapping: 
    Select a folder known to be in the destination datacenter (e.g., the default "Discovered virtual machine" folder).

  5. Validate and Retry: 
    Run validation to confirm the datacenter mismatch is resolved, then initiate the migration.

 

Additional Information

Impact/Risks:
Deleting a Mobility Group without first canceling active migrations can result in orphaned objects or unactionable tasks in the UI Mobility Group Deleted.