Site Recovery Manager (SRM) Planned Migration Fails with "Cannot unmount datastore... which has VMs on it" and "Received unexpected exception during prepare phase"
search cancel

Site Recovery Manager (SRM) Planned Migration Fails with "Cannot unmount datastore... which has VMs on it" and "Received unexpected exception during prepare phase"

book

Article ID: 437182

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

During a Planned Migration in Site Recovery Manager (SRM), the operation fails during the protected site cleanup or VM preparation phase. 

Symptoms:

  • The migration stops with the error: Cannot unmount datastore 'Datastore_Name' which has VMs on it: "VM_Name_A", "VM_Name_B"

  • If a VM was converted to a template prior to migration, a Managed Object Reference (MoRef) ID mismatch occurs, resulting in "This virtual machine is still configured for protection."

  • Subsequent attempts to re-protect or configure VMs result in: ERROR: Internal error: Received unexpected exception during prepare phase. Unexpected exception from VM protection prepare phase.

Environment

  • Site Recovery Manager (SRM): 9.0.2
  • vCenter Server: 8.0 U2
  • Replication Type: Array-Based Replication (e.g., Dell PowerMax SRA)

Cause

The issue may be caused by a combination of factors, including stale inventory or ID mismatch due to VM-to-template conversion (resulting in SRM retaining an outdated MoRef ID and marking the datastore as in use), authentication timeouts from transient communication failures between SRM and the vCenter SPBM endpoint (leading to vim.fault.NotAuthenticated errors during token expiration under heavy workloads), and inventory desynchronization triggered by high Active Directory latency affecting SRM’s inventory cache during bulk protection operations.

Justification

Review the /opt/vmware/support/logs/srm/vmware-dr.log for the following indicators:

Example NotAuthenticated Fault:

2026-04-13T05:12:55.304-04:00 error vmware-dr[02106] [SRM@6876 sub=LocalSite.LocalPbmServer] QueryAllVmAssociatedProfiles: Unable to retrieve profile IDs for vim.VirtualMachine:[HOSTNAME]:vm-102535 
--> (vim.fault.NotAuthenticated) {
-->    object = 'pbm.profile.ProfileManager:[ID]:ProfileManager',
-->    privilegeId = "StorageProfile.View",
-->    msg = "Received SOAP response fault from [<SSL(<io_obj p:[ID], h:114, <TCP '[IP_ADDRESS] : 42986'>, <TCP '[IP_ADDRESS] : 443'>>), /pbm/sdk>]: queryAssociatedProfiles"

Example Provider Lookup Failure:

2026-04-13T05:12:55.172-04:00 warning vmware-dr[02201] [SRM@6876 sub=StorageProvider] Cannot locate protected VM 'protected-vm-######' while looking for its provider details.

Resolution

To resolve the immediate unmount failure and clear stale database states:

  1. Clear Datastore Obstructions:
    • Migrate any unprotected VMs residing on the affected datastore to an alternate datastore.
    • Convert any templates located on the datastore back into Virtual Machines.
  2. Reset Protection States:
    • If the VM ID mismatch persists, delete the affected Protection Group.
    • Recreate the Protection Group to force SRM to recognize the new MoRef IDs.
  3. Refresh Site Pairing:
    • Navigate to Site Pairs in the SRM console.
    • Select the affected pair and click Reconnect. This refreshes authentication tokens and synchronizes the inventory cache between the protected and recovery sites.
  4. Validate Storage Discovery:
    • Perform a Discover Devices operation on the Array Manager.
    • Initiate a Rescan of the host adapters on the ESXi hosts at both sites.
  5. Verify Configuration:
    • Ensure VM CPU reservations are set to 0 MHz (no limits) if placeholder creation fails.
    • Confirm the Placeholder VM Home and Recovery Folders are correctly mapped in Site Settings.

Additional Information

SRM Planned Migration fails with the error - Cannot unmount datastore from host

Live Site Recovery failure on Protection Group showing Not Configured due to duplicate VMs