網頁

2013年3月23日 星期六

Hyper-V 3.0 --- Unplanned Failover in Replica mechanism (part 7)

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.Drawing5
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.ScreenHunter_01
In the Replica Server, right-click VM that we want to power on next to select Replication and Failover
ScreenHunter_01
Start Replica VMIn the Failover Dialog, choose one recovery snapshot that we want to recover this VMScreenHunter_02Click Failover buttonScreenHunter_03The 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. ScreenHunter_05In 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.ScreenHunter_06Right-click this VM and select Delete Saves State… ScreenHunter_13Click Delete button in the dialogScreenHunter_14So does that the VM state will be “Off”. (# 1)ScreenHunter_15Then 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.
ScreenHunter_02In Before You Begin dialog, click Next > buttonScreenHunter_03In Specify Replica Server dialog, click Next > buttonScreenHunter_04In Specify Connection Parameters dialog, click Next > buttonScreenHunter_07In Configure Recovery History dialog, click Next > button if no change anything.ScreenHunter_08In Choose Initial Replication Method dialog, select Use an existing virtual machine on Replica server as the initial copy option next to click Next > buttonScreenHunter_09Click Finish button to complete this WizardScreenHunter_11
In the moment, the Primary VM begin to sending initial dataScreenHunter_19and the Replica VM also begin to receive change dataScreenHunter_18
To wait for a long time that depend on the data size and network bandwidth, we will see that Primary role will be builtScreenHunter_20and Replica role also is created now.ScreenHunter_21
<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
ScreenHunter_17Click Remove Replication buttonScreenHunter_18So does that VM replication status will be clear now.ScreenHunter_19Now we begin to redo Hyper-V replication setting by clicking Enable ReplicationScreenHunter_20
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.
ScreenHunter_12

<<<  Hyper-V 3.0 --- Cancel or Reverse Replication if Planned failover fail (part 6)
Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.