HCX - Migration error "The vm can not be migrated as replication is enabled on it."
search cancel

HCX - Migration error "The vm can not be migrated as replication is enabled on it."

book

Article ID: 314159

calendar_today

Updated On:

Products

VMware HCX VMware Cloud on AWS VMware Cloud on Dell EMC

Issue/Introduction

  • HCX Bulk Migration or RAV (Replication Assisted vMotion) fails with the error "The vm can not be migrated as replication is enabled on it."

 
 
 
  • HCX Bulk Migration or RAV validation fails with the error "Selected migration is not recommended as Replication Config is present with VM"

Environment

HCX 4.x

Cause

On RAV/Bulk migration, It will run a checklist for different processes and services running in the VM. One of the steps is to enable replication for the VM. If it detects that the replication is already enabled, it will fail with that error to avoid any impact in case other applications in the VM are working with replication at that moment.

Resolution

Perform force cleanup of the migration and retry the migration.
If the the same error received after force cleanup you can follow one of the two methods to disable vSphere replication on the affected VM

Note: When using VMC on AWS or a Cloud Provider, you may not have access to the ESXi command line. Please refer to the MOB steps below.

To disable the vSphere Replication feature on a specific virtual machine on the command line.

  1. Connect to the console of the production site ESXi host which is hosting the virtual machine you want to modify is running. For more information, see Using ESXi Shell in ESXi
  2. Run this command to get the virtual machine (VM) ID:

    # vim-cmd vmsvc/getallvms
     
    For more information about the vim-cmd vmsvc/getallvms command, see Powering on a virtual machine from the command line when the host cannot be managed using vSphere Client
  3. Run this command to check the replication configuration:

    # vim-cmd hbrsvc/vmreplica.getConfig <VM_ID>

    Where <VM_ID> is the virtual machine ID noted in Step 2.
  4. Run this command to disable replication services for that virtual machine:

    # vim-cmd hbrsvc/vmreplica.disable <VM_ID>

To disable the vSphere Replication feature on a specific virtual machine using the MOB.

  1. Get the MOID (Managed Object ID) of the VM:
    1. go to URL  https://<vCenter-FQDN>/mob and login to MOB using vsphere administrator credentials
    2. Click on content
    3. Click on  group-d1 (Datacenters)
    4. click on  Datacenter-# (Datacenter name)
    5. choose Datastore-# (Datastore name)  based on datastore the VM configuration files reside
    6. if the VM is not listed with ManagedObjectReference:VirtualMachine, then click on (more...)
    7. Click on vm-# (VM name)
    8. Note the VM MOID 



      Alternatively, you can find the same VM MOID in the URL when you select this VM in vCenter.
       
  2. Check the replication state of the VM:
    https://<vCenter-FQDN>/mob/?moid=hbrManager&method=retrieveReplicationConfig&vmodl=1  

    In the Parameters text box, change the VM MOID to the value noted in the previous step, then click on the "Invoke Method" link, to see the VM replication status.



    A VM that is not configured for replication looks like the screenshot below:



  3. If the status is other than that showing above, then you can clear the replication state with the following:
    https://<vCenter-FQDN>/mob/?moid=hbrManager&method=disableReplication&vmodl=1 

    In the Parameters text box, change the VM MOID to the value noted in step 2, then click on the "Invoke Method" link, to see the VM replication status.


  4. Perform step 2 to confirm that the replication was disabled for the affected VM


Once replication is disabled, you can proceed with the migration again.


If the above steps does not resolve the issue, please open a support case with Broadcom Support and refer to this KB article.

Additional Information