Replication state shows the current state of the replicating VM. It indicates whether the VM is being replicated, whether initial replication is pending etc.

ReplicationState can be queried from:

  • UI – As seen in the above picture
  • PowerShell – Using the **Measure-VMReplication **cmdlet.
  • WMI – From Msvm_ComputerSystemclass where ReplicationState is a property

The table below captures the states as seen in WMI, UI and PowerShell.

**WMI** **UI** **PowerShell** **Notes**
0 Not enabled NA VM is **not**   enabled for replication.
1 Pending Initial   Replication ReadyForInitialReplication Replication relationship has been created but **Initial Replication**   has not been initiated. This is seen on the primary VM only.
2 Pending Initial   Replication WaitingForInitialReplication The replica VM enters this state when a replication   relationship has been created but **Initial   Replication **has not been initiated (or) **Initial Replication**   is in progress. The primary VM enters this state when **Initial Replication**   is in progress.
3 Replication Enabled Replicating This state (on  both the primary and replica VM)   indicates that the replication is ‘**Normal**’.
4 Prepared for planned   failover SyncedReplicationComplete This state is applicable only for the primary VM. It indicates   that **Planned   Failover** is complete and that the VM is locked from powering   up.
5 Failover Complete FailOverWaitingCompletion **Failover** has been initiated on the   replica VM but has not been completed. The Failover operation is considered   to be complete only when the VM is either reverse replicated (or) when   additional recovery points are removed.
6 Failover Complete FailedOver The replica VM enters this state once the **Failover**   operation has been completed.
7 Replication Paused Suspended The VM enters this state when replication is **Paused**. This   state is applicable on both the primary and replica VM
8 Replication Error Error This state is applicable on both the primary and replica VM   and indicates that replication is not occurring on either VM. Usually   administrator intervention is required to restore replication.
9 Resynchronization required WaitingForStartResynchronize The primary VM enters this state when it needs to be   resynchronized.
10 Resynchronizing Resynchronizing Resynchronization has been initiated on the primary VM.
11 Resynchronize Suspended ResynchronizeSuspended If the primary VM suspends the resynchronization

Cheers,

Marcos Nogueira azurecentric.com Twitter: @mdnoga