Unable to list target datastores for enhanced replication with error "No target datastores are accessible from hosts that support enhanced replication" in vSphere enhanced Replication
search cancel

Unable to list target datastores for enhanced replication with error "No target datastores are accessible from hosts that support enhanced replication" in vSphere enhanced Replication

book

Article ID: 459796

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

When attempting to configure new Virtual Machines (VMs) using enhanced replication or viewing existing configured replications in vSphere Replication, you encounter the following symptoms:

  • Target datastores fail to list during replication setup, resulting in the error:

    "No target datastores are accessible from hosts that support enhanced replication"

  • Datastores are not visible for existing configured replications.

  • Enhanced replication mappings for all hosts show a Good status.
  • Replication servers are in a Connected state.

  • Existing replication statuses are in an OK state.

  • NTP is fully synchronized across vCenter, ESXi hosts, and replication appliances

  • In the HMS appliance logs (/var/log/vmware/hms/dr.log), an error similar to the following is logged:

 [srm-reactive-thread-276] ERROR com.vmware.dr.client.shared.datastores.DatastoresListDataHandler -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx getDatastoresList - Could not get datastore details.
(hms.fault.HmsRuntimeFault) {
   faultCause = (vim.fault.InvalidState) {
      faultCause = null,
      faultMessage = null
   },
   faultMessage = null,
   originalMessage = Duplicate key host-6976110 (attempted merging values 30004.0 and 30004.0)

The following steps do not resolve this issue:

  • Reconfiguring the replication appliance from the VAMI interface.

  • Restarting the hbrsrv, hms services on the replication appliance or  hbr-agent, hbrsrv services on the ESXi hosts.

Environment

Vsphere Replication 9.x

Cause

This issue occurs due to stale VRMS (vSphere Replication Management Server) metadata residing in the embedded database. Outdated host information or duplicate entity mappings cause an internal runtime key merge conflict when HMS attempts to query and retrieve datastore details for host-based enhanced replication.

Secondary potential causes include:

  • Missing Host-Based Replication (HBR) agent VIBs on ESXi hosts (e.g., if auto-install was disabled).

  • DNS or SSL certificate communication/handshake failures between the SRM plugin and VRMS SSL certificate due to FQDN mismatches or resolution errors.

Resolution

Important Prerequisite: Take a manual VM snapshot of both VRMS appliances before making any database modifications.

Execute the following steps on both local and remote VRMS appliances to clean up stale entries from the embedded database:

  1. Connect to the VRMS Appliance via SSH as admin and switch root.

  2. Stop the HMS Service: systemctl stop hms

  3. Connect to the Embedded Database:

    1. For vSphere Replication versions prior to 9.0.4: /opt/vmware/hms/bin/embedded_db_connect.sh

    2. For vSphere Replication version 9.0.4.x and later: /opt/vmware/vpostgres/current/bin/psql -U vrmsdb

  4. Identify Stale Entries: Run the following queries to verify the records targeted for removal:

select hbrserver_movalue from hbrtagentity where hbrserver_movalue IN (select movalue from hbrserverentity where vsrv_port = 443 AND NOT EXISTS (select hbrserver_movalue from secondarygroupentity where hbrserverentity.movalue = secondarygroupentity.hbrserver_movalue));

select hbrservername,movalue from hbrserverentity where vsrv_port = 443 AND NOT EXISTS (select hbrserver_movalue from secondarygroupentity where hbrserverentity.movalue = secondarygroupentity.hbrserver_movalue);

  1. Delete Stale Entries: Execute the cleanup statements:

delete from hbrtagentity where hbrserver_movalue IN (select movalue from hbrserverentity where vsrv_port = 443 AND NOT EXISTS (select hbrserver_movalue from secondarygroupentity where hbrserverentity.movalue = secondarygroupentity.hbrserver_movalue));

delete from hbrserverentity where vsrv_port = 443 AND NOT EXISTS (select hbrserver_movalue from secondarygroupentity where hbrserverentity.movalue = secondarygroupentity.hbrserver_movalue);

  1. Exit the Database Prompt: \q or Ctrl+d

  2. Restart the HMS Service: systemctl restart hms

  3. Log in to the vSphere Client, navigate to Site Recovery, and verify that target datastores are now visible when configuring enhanced replication.

Additional Information

ADDITIONAL INFORMATION If cleaning up stale database entries does not resolve the behavior:

  • Verify that the Host-Based Replication agent (vSphere Replication Agent) VIB is installed and properly running on all ESXi hosts using the command: /etc/init.d/hbr-agent status

  • Verify DNS resolution and reverse lookups between vCenter, VRMS appliances, and ESXi hosts.

  • Review /var/log/vmware/hms/dr.log on the VRMS appliance for any lingering SSL certificate or handshake faults.