Pcornel
Automation · Hyper-V Automation

Replication

Cheat sheet · https://pcornel.dk/topic.php?topic=5717

Back to the Topic

Answer

Hyper-V replication automation configures Hyper-V Replica with Enable-VMReplication, Start-VMInitialReplication and Start-VMFailover, replicating VMs to a second host or site.

Remember

  • Replica server must allow incoming replication.
  • Initial replication can be large.
  • Test failover regularly.

First checks

  • Enable-VMReplication -VMName <vm> -ReplicaServerName <r> -ReplicaServerPort 80 -AuthenticationType Kerberos — enable
  • Start-VMInitialReplication -VMName <vm> — initial sync
  • Get-VMReplication | ft VMName,State,Health — status

Verify in this order

enable → initial sync → ongoing replication → test failover

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5717

Confirmation

Confirm action

Continue?