During a Planned Migration in Site Recovery Manager (SRM), the operation fails during the protected site cleanup or VM preparation phase.
Cannot unmount datastore 'Datastore_Name' which has VMs on it: "VM_Name_A", "VM_Name_B""This virtual machine is still configured for protection."ERROR: Internal error: Received unexpected exception during prepare phase. Unexpected exception from VM protection prepare phase.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.
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.
To resolve the immediate unmount failure and clear stale database states: