Hyper-V Replica Explained – Part 5 Hyper-V Replica Explained – Part 5

13 Jun by Nirmal Sharma     11     Hyper-V Articles

In Part 1 and Part 2 of this article series, we learned the basics of Hyper-V Replica and benefits it provides for small and medium sized businesses. In Part 3, we learned how to install and configure it in a production environment and Part 4 explained how Hyper-V Replica is not a replacement for backup. In the final part of this article series, we are going to learn about the types of failover which are available with Hyper-V Replica.

The other parts of this series are:

The concept of Hyper-V Replica  starts from learning how to enable Hyper-V Replica on a Hyper-V Server to how to configure a virtual machine for replication. But that is just how to enable and configure Hyper-V Replica. There is much more to talk about, for example how different types of failover are available and how to use them.

When you need to bring a virtual machine online at Replica Site, you use something called “failover”. There are three types of failover available with Hyper-V Replica as listed below:

  • Test Failover
  • Planned Failover
  • Unplanned Failover

Test Failover

Test Failover, as the name suggests, can be used to test the virtualized workloads on the Replica Server. This is to ensure the Replica Virtual Machine can be brought online at the Replica Server in case of any disaster with Primary Virtual Machine.

Test Failover creates a Test Virtual Machine on the Replica Server. The new virtual machine created by the Test Failover process is appended with tag “Test”. You can always turn the Test virtual machine ON to ensure it is functioning properly. Once you are satisfied that virtual machine is working properly, you can stop the test failover by clicking Stop-Test Failover from Right Click context menu on Replica Virtual Machine.

Test Failover is always executed at Replica Server and is available as “Test Failover” action on the Right Click Context menu of the Virtual Machine as shown in the below screenshot:

Planned Failover

Planned Failover is initiated manually by an administrator to move the virtualized workloads from Primary Server to Replica Server. Planned Failover is used when you have maintenance window opened for Primary Site and it needs to go down for some maintenance activities.

Planned Failover performs the some perpetuities before the failover can take place. This includes checking the ability for Replica Server to become as Primary Server also. This is required in order to move the virtualized workloads back to Primary Server.

Note: “Planned Failover” is always executed at Primary Server.

Unplanned Failover

Unplanned event occurs when something goes wrong at the Primary Site or in other words Primary Virtual Machine will stop functioning.

Unplanned Failover appears as “Failover” on the Right Click context menu of the Replica Virtual Machine as shown in the below screenshot:

Clicking the “Failover” allows you to recover the Replica Virtual Machine using the recovery history of your choice. You will be presented with the list of recovery points for your selection as shown in the below screenshot:

If the Replica Virtual Machine does not come online using one of the recovery points you select, you can always use “Cancel Failover” and try with a different recovery point.

Note: Unplanned Failover is always executed at the Replica Server.

Conclusion

In this series, we learned from the benefits of using Hyper-V Replica to different types of failover available with it. We learned how Hyper-V Replica is useful for small and medium sized businesses to reduce the overall cost when it comes to setting up an environment which includes SAN devices.

 

Have any questions?

Leave a comment below!

Backing up Hyper-V

If you’d like to make backing up your Hyper-V VMs easy, fast and reliable, check out Altaro Hyper-V Backup v4. It’s free for up to 2 VMs and supports Hyper-V Server 2012 R2! Need more? Download a 30-day trial of our Unlimited Edition here: http://www.altaro.com/hyper-v-backup/.

Receive all our free Hyper-V guides, checklists and ebooks first via email!

(Don’t worry, we hate spam too!)

Nirmal Sharma

Nirmal is a MCSEx3, MCITP and Microsoft MVP in Directory Services. He is specialized in Directory Services, Microsoft Clustering, Hyper-V, SQL and Exchange. He has been involved in Microsoft Technologies since 1994 and followed the progression of Microsoft Operating System and software. In his spare time, he likes to help others and share some of his knowledge by writing tips and articles. Nirmal can be reached at nirmal_sharma@mvps.org.

11 Responses to “Hyper-V Replica Explained – Part 5”

  1. Andrew Kelly

    If a virtual host requires maintenance and guest VMs need to be moved to a different host in the meantime, is it better to use the Planned Failover functionality of Hyper-V Replica, or Live Migration? It seems to me that Live Migration is better suited to relocating VMs permanently. Is the Planned Failover function designed to be used in this way?

    • Nirmal Sharma
      Nirmal Sharma

      Hi Andrew,

      Yes, we can use Planned Failover in case of any maintenance activities. After failover you can switch back virtualized workloads to Primary Server. But remember there’s little downtime but yes, no downtime involved when moving using Live Migration.

      Thanks!
      Nirmal.

  2. John R

    Is it possible to switch Primary and Replica locations? Could you use Planned Failover to get the machines to the Replica (Secondary) location, and then declare the Secondary location to now be Primary, and set the Primary location to now be Replica Location?

    • Nirmal Sharma
      Nirmal Sharma

      Hi John – Thanks for reading!

      Yes, that’s possible. You configure Hyper-V Primary Server to accept incoming replication!

      /Nirmal

  3. John R

    Thank you for your instructions and help.

  4. arm

    can we make it this replica activity using different domain.i mean primary server and replica server are using different domain but still connecting using the same network.

    • Nirmal Sharma
      Nirmal Sharma

      Hi Arm, Yes, we can implement Hyper-V Replica in different domains!

      Thanks!
      Nirmal

  5. arm

    hi,i have look also this activity at youtube but i still have many concern.Such as how can i replicate server(vm) and SAN storage to DR.Which is DR are using different SAN storage.When i look on tutorial at youtube,just have a simple and a bit step to make hyperv replica.But how can i replicate server that attach with LUN.Is it i need to create LUN at DR site also or what?

    thank you.

  6. Nirmal Sharma
    Nirmal Sharma

    Hyper-V Replica is designed to eliminate a need for implementing SAN device between Primary and Replica Server. It is not SAN-aware at all and it uses its own engine to implement the “data replication”.

    Please check out how Hyper-V Replica works:
    http://hub.altaro.com/hyper-v/how-hyper-v-replica-actually-works/

    And yes you must add a LUN at DR site!

    Thanks!
    Nirmal

  7. sam

    Nirmal, How do you feel about replica for SQL 2008/2012 virtual machines? I know it is support but haven’t tested SQL.

    thanks,
    Sam

    • Nirmal Sharma
      Nirmal Sharma

      Running SQL in Replica environment requires a little bit planning. You have two options; (1) location of database and log files on a single VHD file, (2) store database and log files on separate VHD files. For 2nd one, you must enable EnableWriteOrderPreservationAcrossDisks as explained in this MS KB: http://support.microsoft.com/kb/956893.

      HTH
      Thanks!
      Nirmal

Leave a comment