question

ngsysadm-2987 avatar image
0 Votes"
ngsysadm-2987 asked ngsysadm-2987 answered

Unplanned Hyper-V Replication how to correct

Unplanned Hyper-V Replication

I have 2 Nodes, Node1 Primary, Node2 is Replica.
How to do Reverse? What is the best practice?
To do Cancel Replication and return back to Node1 or do Reverse and stay in Node2?

Let’s say that Node1 is unplanned fell, I have replication each other 30 seconds, run PS commands to start VMS on Node2
Start-VMFailover -Confirm:$false
Start-VM

After Node1 is up, try to return Replication between Node1 and Node2, at reverse mode.
Node1 = Replica, Node2 = Primary
Run this PS script(maybe mistake at script) at Node2:

Start-VMFailover -VMName -Confirm:$false
$snaps = Get-VMSnapshot
-SnapshotType Replica
ForEach ($item in $snaps){
Start-VMFailover -VMRecoverySnapshot $item -Confirm:$false
$item
}
Complete-VMFailover -VMName * -Confirm:$false

Set-VMReplication -VMName * -AsReplica

Set-VMReplication -Reverse -VMName *

Start-VMInitialReplication -VMName *

Its error

windows-server-hyper-v
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hello @Ngsysadm-2987,

Thank you for your question.

Hyper-V Replica is an integral part of the Hyper-V role. It contributes to your disaster recovery strategy by replicating virtual machines from one Hyper-V host server to another to keep your workloads available.

See the link below that shows how to "Configure Hyper-V Replica" as it's always a good idea to refer to this to review what we need to do:

https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/manage/set-up-hyper-v-replica

Also, see the topic below that will address a problem similar to yours:

https://social.technet.microsoft.com/Forums/en-US/91f23c6a-3448-4146-b2b2-0f6f5c0e9181/unplanned-recovery-steps-unknown-in-hyperv?forum=winserverhyperv



If the answer is helpful, please vote positively and accept as an answer.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ngsysadm-2987 avatar image
0 Votes"
ngsysadm-2987 answered

Thank you for links but I know how to setup replication, it's worked! But PS script can not do automatically reverse replication

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.