Tuesday, July 16, 2013

Replication is already enabled..............But it's not

Don't lie to me vSphere Replication!


Have you ever gone to enable vSphere Replication (VR) in the new 5.1 web GUI and it comes back with the error "Replication is already enabled" when it just clearly is not? YES?! Well then maybe I can help you! VR is based off of a service called Host Based Replication (HBR). This is a service that actually runs on the host and not on the vSphere Replication Appliance or vCenter. Because of this, if you lose your VRA or VC configuration, your host may still think it's replicating a VM but VRA and/or VC think otherwise. When you go to enable replication, VC queries the host and the host comes back and says (you guessed it) "Replication is already enabled".


So how do we make an honest box out of VR?


Here is a quick way to diagnose and resolve this issue.

1) In the summary tab for the VM, find what host the VM is currently on
2) Get an SSH session to the host
3) Run the command ~#vim-cmd vmsvc/getallvms
4) In front of the VM in question, there will be a number, copy this number down
5) Run the command ~#vim-cmd hbrsvc/vmreplica.getState <#>  where "<#>" is replaced with the number in the previous step
6) If the replica state says "VM not enabled for replication" there is a different issue and you will need to dig further
7) If the VM shows that the disks are replicating you can stop the replication with the command ~#vim-cmd hbrsvc/vmreplica.disable <#> where "<#>" is replaced with the same number as in step 5
8) A
fter that, you should be able to enable replication again through the GUI

Hopefully this helps get your replication back up and running!

Want the SRM findings of a TSE in the trenches? Follow me on Twitter! @SRM_Guru

**********************************************Disclaimer**********************************************
This blog is in no way sponsored, supported or endorsed by VMware. Any configuration or environmental changes are to be made at your own risk. Casey, VMware, and any other company and/or persons mentioned in this blog take no responsibility for anything.   

3 comments:

  1. Precisely what I needed. I've mostly been doing SRM with FCIP until recently to the HBR commands are new to me. Thanks!

    ReplyDelete
  2. Muito Obrigado!!!!
    Seu post me ajudou, funcionou perfeitamente

    ReplyDelete