When the primary VM or Site suffers a disaster as VM crash or unexpected power outage or fire, we have to do Unplanned Failover on the replica VM. In unplanned failover scenario, maybe some data will lose because it never transmits data change from the primary VM to replica VM in the disaster. At least, we have a chance to recover or correct data loss, not always no chance.
If the primary Server without clustering mechanism goes offline suddenly, we have to operate manually the related steps because the workload does not automatically transfer to the Replica VM.
How to do it?
Configure Replica VM Network
At first, we have to configure the network parameter of the Replica VM next to do failover. When we manually connect a NIC of the Replica VM to network before do unplanned failover, we have to ensure that there is no any collision with the primary VM if it still be running in the production or be live before fix the problem.
In the Replica Server, right-click VM that we want to power on next to select Replication and Failover
Start Replica VMIn the Failover Dialog, choose one recovery snapshot that we want to recover this VMClick Failover buttonThe VM will start and it will begin to supply the related service now. If we ever backup data in online or near line, maybe we have to restore some data for keeping the data integrity. In the moment, although the Replica VM has already been online, it still be unprotected status against the future failure because no exist backup or standby VM now. So we have to setup Hyper-V Replica and there is two scenario can be chosen.
<Scenario 1>: Start reverse replicationIf the original primary server can be online in the future, we can do reverse replication because the Replica VM muse be replicated back to the original primary server.
When the primary server come back now, we will will see the VM state is “Saved” and replication information as before.Right-click this VM and select Delete Saves State… Click Delete button in the dialogSo does that the VM state will be “Off”. (# 1)Then we begin to execute reverse replication setting.
In the Replica Server, right-click VM next to select Replication and Reverse Replication… so that the wizard will be launch.
In Before You Begin dialog, click Next > buttonIn Specify Replica Server dialog, click Next > buttonIn Specify Connection Parameters dialog, click Next > buttonIn Configure Recovery History dialog, click Next > button if no change anything.In Choose Initial Replication Method dialog, select Use an existing virtual machine on Replica server as the initial copy option next to click Next > buttonClick Finish button to complete this Wizard
In the moment, the Primary VM begin to sending initial dataand the Replica VM also begin to receive change data
To wait for a long time that depend on the data size and network bandwidth, we will see that Primary role will be builtand Replica role also is created now.
<Scenario 2>: Redo Replication
If the original primary server crash and it is impossible to be online in the future, maybe we can redo replication setting that configure the Replica VM replicate to the another Hyper-V Server.
In the Replica Server, right-click VM next to select Replication and Remove Replication
Click Remove Replication buttonSo does that VM replication status will be clear now.Now we begin to redo Hyper-V replication setting by clicking Enable Replication
Reference :
(# 1) Why the primary VM state need to be “Off” ?
Because it will fail to use a restored copy of a virtual machine as the initial copy.
<<< Hyper-V 3.0 --- Cancel or Reverse Replication if Planned failover fail (part 6)