Fixing your vSphere Replication after error.

Hey All, 

This one is for me to remember the methods to fix an issue using vSphere Replication 5.1.2.0 and a VM losing it's replication, me attempting to reconfigure and it failing with generic error, going through the removal process and it erroring out stating the VM is already being replicated.


  • Find the VMHost that VM in question is residing on.
  • Enable SSH on the VMHost 
  • Type "vim-cmd vmsvc/getallvms | grep <ServerName>"
  • Take note of the VMID 
  • Type "vim-cmd hbrsvc/vmreplica.getConfig <VMID>"

Retrieve VM replication configuration:
        The VM is configured for replication with the following options:
                VM Replication ID = GID-xxxxxxxxxxxxxxxxxxxxxxxx
                Destination IP Address = x.x.x.x
                Destination Port = 44046
                Recovery Point Objective = 15
                Quiesce Guest OS = true
                Enable Opportunistic Updates = false
                Paused for Replication = false

                Disk scsi0:0 is configured for replication:
                        Device key = 2000
                        Replication ID = RDID-xxxxxxxxxxxxxxxxxx

  • Type "vim-cmd hbrsvc/vmreplica.getState <VMID>"

Retrieve VM running replication state:
        The VM is configured for replication. Current replication state: Group: GID-xxxxxxxxxxx (generation=3503045010214268)
        Group State: full sync (64% done: checksummed 32.4 GB of 50 GB, transferred 1.1 MB of 1.1 MB)
                DiskID RDID-xxxxxxxxxxxxxxxxxxxxx State: full sync (checksummed 32.4 GB of 50 GB, transferred 1.1 MB of 1.1 MB)

  • Attempt the disable of the Replication 
  • Type "vim-cmd hbrsvc/vmreplica.disable <VMID>"
Disable VM Replication:
  • Type "vim-cmd hbrsvc/vmreplica.getConfig <VMID> | grep msg"
msg = "The vSphere Replication configuration of the virtual machine has an issue: Replication is not enabled."

Perfect!  Re-enable the replication. 

Other Troubleshooting techniques

Restart the management services on the VMHost and then rerun the commands above.

services.sh restart




0