Protecting a virtual machine using SRM and vSphere Replication fails with the error: Virtual machine is in an invalid state
search cancel

Protecting a virtual machine using SRM and vSphere Replication fails with the error: Virtual machine is in an invalid state

book

Article ID: 304529

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

Symptoms:
  • Protecting a virtual machine using VMware vCenter Site Recovery Manager (SRM) and vSphere Replication fails
  • On the protected site, thevirtual machine shows a protection status of Replication Warning
  • The protection group shows Not configured
  • The vmkernel.log file on the ESX host where the virtual machine was running shows entries where a connection could not be established to remote vSphere Replication server.
  • When checking the replication status or forcing a Sync on one of the virtual machines on the ESX host, you see:

    ~ # vim-cmd hbrsvc/vmreplica.sync 71
    Force a replica synchronzation for the VM:
    (vim.fault.ReplicationVmFault) {
    dynamicType = ,
    faultCause = (vmodl.MethodFault) null,
    reason = "invalidState",
    state = "syncing",
    instanceId = ,
    vm = 'vim.VirtualMachine:71',
    msg = "vSphere Replication operation error: Virtual machine is in an invalid state.",

    ~ # vim-cmd hbrsvc/vmreplica.queryReplicationState 71
    Querying VM running replication state:
    Current replication state:
    State: syncing
    Progress: 0% (checksum: 0/37580963840; transfer: 0/0)
    ~ #


Cause

This issue can be caused by network connectivity problems between the ESX/ESXi host where the virtual machine is registered and the vSphere Replication Server at the recovery site. It can also be caused by an incorrectly configured firewall blocking certain TCP connections that are required for SRM to function.

Resolution

To troubleshoot this issue:

  1. Check the network connection between the ESX/ESXi host where the virtual machine is registered and the vSphere Replication server on the recovery site.

  2. Check the connection both ways by using ping command.

  3. Check with the telnet command that all required ports are open between ESX/SRM/vSphere Replication servers. For more information about required open ports, see Port numbers that must be open for Site Recovery Manager and vCenter Server (1009562).

  4. Attempt to isolate the replication failure to a particular host or group of hosts. Migrate the virtual machine that failed to replicate to a different host with vMotion, and try to initiate replication from there. If it works, the network connectivity problem may be confined to a single host.


Additional Information

Ports that must be open for Site Recovery Manager 1.0.x to 5.5.x, vSphere Replication 1.0.x to 5.5.x, and vCenter Server