Failover is something that you don’t want to perform. You need to do this when there is a problem, and when it is necessary, you need to be prepared. An important note: Do not wait for a problem to occur before you familiarize yourself with this procedure. Try it out in a test / dev / POC environment and make sure the steps are well documented. I have seen too many situations where IT had everything in place, but the moment they needed to act (under pressure), things went wrong. Don’t get me wrong—if you need to do a failover, there will be pressure, but if you have practiced, you should be able to do it.
Let’s say you have a situation on your hands and your server is down at your production environment. It looks like it is a serious problem and you decide to go with the replica.
As shown in Figure 31, go to the replica server, right-click on the replica VM and choose replication > failover…
You will get a clear warning that you cannot do this unless the primary VM is down and that there is a possibility that the replica does not have the latest data, so data loss might occur. When you are certain that you need to perform this failover, select the recovery point (if you have multiple) and press the Fail Over button (shown in Figure 32).
You will see that the replica VM will start running (Figure 33).
You need to use the PowerShell cmdlet Complete-VMFailover (shown in Figure 34) to make sure that the failover is completed.
As you can see in the Replication Health window, the failover is now complete (Figure 35). The moment you get the primary server back online (or, in a worst case scenario, you have built a new one) you can reverse the replication to make sure that everything will be back to normal after a while.