Unable to configure replication after the VM was restored using backup.
search cancel

Unable to configure replication after the VM was restored using backup.

book

Article ID: 375853

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

Symptoms:

  • VMs restored from backup, when configured for replication may fail with the error: "Unable to configure replication for virtual machine '###' because the virtual machine is already replicated. Cannot create group '###'. Operation ID: ########-####-###-####-###-#############".

  • This issue may occur while replicating a VM within the same vCenter.

  • This issue may also occur for VMs which were migrated from one vCenter to another using VMware HCX (Hybrid Cloud Extension).

    • Even though the VM has been removed from HCX, it fails to be configured for vSphere Replication.

Environment

vSphere Replication 8.x

vSphere Replication 9.x

Cause

  • The VM fails to be configured for replication, as the VM has stale replication entry on the source ESXi host.

  • This can be validated by running the command on SSH on source ESXi host:

    1. Command to get the VM ID: vim-cmd vmsvc/getallvms | grep -i <vm_name>
      Make a note of the vm_id, it would be the first column of the output.

    2. Command to get VM replication state: vim-cmd hbrsvc/vmreplica.getState <vm_id>

      Example output:
      root@esxi~] vim-cmd hbrsvc/vmreplica.getState <vm_id>
      Retrieve VM running replication state:
         The VM is configured for replication. Current replication state: Group: VRID-########-####-####-####-############ (generation=###############)
         Group State; full sync (0% done: checksummed 0 bytes of 5.7 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 ### 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)
  • When configuring a VM for replication, VR finds this existing replication and thus blocks creation of new replication for the VM.

Resolution

To resolve this issue:

  1. Log in to SSH of ESXi host as root, where the running VM resides.

  2. Run this command to get the VM ID: vim-cmd vmsvc/getallvms | grep -i <vm_name>
    Make a note of the vm_id, it would be the first column of the output.

  3. Run this command to get VM replication state: vim-cmd hbrsvc/vmreplica.getState <vm_id>

  4. Match the GID/VRID from this output and the error seen on the Graphical User Interface (GUI). If this virtual machine is not configured for replication, it is a stale entry on the ESXi host and can be safely removed.

  5. To disable the VM's replication on the host and removing the entry, run this command: vim-cmd hbrsvc/vmreplica.disable <vm_id>

  6. Re-attempt to configure VM for replication.