Protecting a VM using HCX-DR fails "Replication is already enabled on VM"
search cancel

Protecting a VM using HCX-DR fails "Replication is already enabled on VM"

book

Article ID: 397326

calendar_today

Updated On:

Products

VMware HCX

Issue/Introduction

  • Protecting a VM using HCX-DR fails with the error "Replication is already enabled - replication is already enabled on VM with id: HRID #######-####-####-####-############"



  • When checking the VM directly on the vCenter, you may also notice the below configuration issue: "No Connection to VR Server: Unknown".
    Note: This error can be observed across multiple different scenarios.

Environment

VMware HCX

Cause

We can check the status of the VM replication directly from the ESXi host and verify whether the HRID differs from the one shown in the failed task. You can verify the same by following the below steps,

  • [root@ESXi_Host_Name:~] vim-cmd vmsvc/getallvms | grep -i VM_Name                            
    Vmid   Name                                File
    11     VM_Name                            [Datastore_Name] VM_Name/VM_Name.vmx
  • [root@ESXi_Host_Name:~] vim-cmd hbrsvc/vmreplica.getState 11
    Retrieve VM running replication state:
            The VM is configured for replication. Current replication state: Group: HRID-#######-####-####-####-############ (generation=########################)
            Group State: full sync (0% done: checksummed 0 bytes of 1 TB, transferred 0 bytes of 0 bytes)
                    DiskID RDID-#######-####-####-####-############ State: full sync (checksummed 0 bytes of ## GB, transferred 0 bytes of 0 bytes)
                    DiskID RDID-#######-####-####-####-############ State: full sync (checksummed 0 bytes of ## GB, transferred 0 bytes of 0 bytes)
                    DiskID RDID-#######-####-####-####-############ State: full sync (checksummed 0 bytes of ## GB, transferred 0 bytes of 0 bytes)
                    DiskID RDID-#######-####-####-####-############ State: full sync (checksummed 0 bytes of ## GB, transferred 0 bytes of 0 bytes)
                    DiskID RDID-#######-####-####-####-############ State: full sync (checksummed 0 bytes of ## TB, transferred 0 bytes of 0 bytes)
                    DiskID RDID-#######-####-####-####-############ State: full sync (checksummed 0 bytes of ## TB, transferred 0 bytes of 0 bytes)
                    DiskID RDID-#######-####-####-####-############ State: full sync (checksummed 0 bytes of ## GB, transferred 0 bytes of 0 bytes)
                    DiskID RDID-#######-####-####-####-############ State: full sync (checksummed 0 bytes of ## TB, transferred 0 bytes of 0 bytes)
                    DiskID RDID-#######-####-####-####-############ State: full sync (checksummed 0 bytes of ## GB, transferred 0 bytes of 0 bytes)
                    DiskID RDID-#######-####-####-####-############ State: full sync (checksummed 0 bytes of ## GB, transferred 0 bytes of 0 bytes)

Resolution

To resolve the issue, please follow these steps:

  1. Using the HRID #######-####-####-####-############ from the error message, identify the task that successfully initiated replication of the VM but may have failed to complete the rest of the task.
  2. Document the reason for the failure of this original replication task, as this will require further troubleshooting.
  3. Remove the initial/original failed task from the HCX UI. Avoid using the force remove option unless it is the only available way to proceed.
  4. Once the removal is complete, you should be able to verify the VM’s replication state on the ESXi host.
    • [root@ESXi_Host_Name:~] vim-cmd hbrsvc/vmreplica.getState 11
      Retrieve VM running replication state:
      (vim.fault.ReplicationVmFault) {
         faultCause = (vmodl.MethodFault) null,
         faultMessage = <unset>,
         reason = "notConfigured",
         state = <unset>,
         instanceId = <unset>,
         vm = 'vim.VirtualMachine:11'
         msg = "Received SOAP response fault from [<<io_obj p:0x############, h:#, <TCP '############ : #####'>, <TCP '############ : ####'>>, /sdk>]: getGroupState
      vSphere Replication operation error: Virtual machine is not configured for replication."
      }
      [root@ESXi_Host_Name:~]
  5. Before retrying replication, address the root cause of the original replication failure documented in step 2. If the cause was not documented earlier, you will need to retry and then troubleshoot the error.