Enhanced Replication Mappings fail with "InvalidState" in SRM/vSphere Replication
search cancel

Enhanced Replication Mappings fail with "InvalidState" in SRM/vSphere Replication

book

Article ID: 447585

calendar_today

Updated On:

Products

VMware Site Recovery Manager

Issue/Introduction

When attempting to create or manage Enhanced Replication Mappings within the Site Recovery Manager (SRM) or vSphere Replication (VR) plugin, the following symptoms occur:

  • The operation fails with a generic VRMS error (InvalidState).
  • Standard (non-enhanced) replication remains fully functional.
  • The SRM plugin may report an inability to resolve or connect to the local vSphere Replication Management Server (VRMS).
  • No port blockages or general networking issues are detected between the source and target sites.

Environment

VLR (VMware Live Recovery) 9.x or higher

Cause

This issue could be caused by one or more of the following environment failures occurring independently or in combination:

  1. Stale VRMS Metadata: Outdated host information in the VRMS database conflicts with the current environment state.
  2. Missing HBR Agent VIBs: The Host-Based Replication (HBR) agent is missing from ESXi hosts because the auto-install property was disabled.
  3. DNS/Certificate Communication Failure: The SRM plugin cannot establish a secure handshake due to an FQDN mismatch or resolution error on the VRMS SSL certificate.

Resolution

To resolve this issue, evaluate and perform the following actions based on the specific failures identified in your environment. Note: Section 1 and Section 2 should be performed on both the source and target site vSphere Replication appliances.

  1. Refresh VRMS Host Metadata (Both Sites)

Before proceeding, take a virtual machine snapshot of both VRMS appliances.

Follow these steps on each appliance to clean the embedded database:

    1. Stop the HMS Service: systemctl stop hms
    2. Connect to the VR Database: /opt/vmware/hms/bin/embedded_db_connect.sh
    3. Identify Stale Entries: Verify the records to be removed
      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);
    4. Delete Stale Entries:
      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);
       
    5. Restart the HMS Service: systemctl restart hms
  1. Enable and Deploy HBR Agent VIBs

If the HBR agent is missing from ESXi hosts (esxcli software vib list | grep hbr), enable auto-installation:

  1. Check Current Setting: grep -i hms-auto-install-hbragent-vib /opt/vmware/hms/conf/hms-configuration.xml
  2. Enable Auto-Install: If the value is false, run the following: /opt/vmware/hms/bin/hms-configtool -cmd reconfig -property hms-auto-install-hbragent-vib=true
  3. Restart HMS Service: systemctl restart hms Note: VRMS will now push the HBR VIBs to the local ESXi hosts.

3. Validate DNS and Recreate SSL Certificates

Insecure communication between vCenter/SRM and VRMS can block Enhanced Replication.

  1. Verify DNS: Confirm Forward and Reverse DNS resolution for the VRMS FQDN from the vCenter and SRM nodes.
  2. Regenerate Certificate: If a certificate error persists or the FQDN does not match the CN/SAN, follow the official documentation to Change the SSL Certificate of the vSphere Replication Appliance.
    • Ensure the new certificate includes the verified DNS FQDN.
    • After the certificate change, re-register the VRMS with vCenter and reconnect the site pair.

Additional Information

Impact/Risks

Modifying the embedded database and changing system certificates carries risk and will temporarily interrupt replication services. Ensure snapshots are confirmed healthy before making changes.