Performing a Hyper-V Replica Test Failover

In this post I will explain how you can use the test failover functionality of Hyper-V Replica to evaluate the infrastructural elements of implementing a business continuity plan (BCP).

What Is a Test Failover?

Just like a backup, your disaster recovery (DR) business continuity plan needs to be tested. And just as with a test backup, you need to be able to test the technology elements, namely starting up the replica virtual machines and therefore their services, without any impact on running production systems and the operations of the business.

Hyper-V Replica has a built-in feature called a test failover that allows you to start up linked clones of your offline replica virtual machines on a selected virtual network (probably isolated) without impacting your production systems. These test virtual machines can be created very quickly, started up, used, and destroyed, making the technical elements of your BCP test very easy.

There also is a nice unintended scenario with test failovers: You can use this feature to not only test your BCP, but also to bring online a copy of production systems for testing and diagnostics. Maybe engineers need to test OS or service upgrades and document upgrade/rollback plans? Maybe service administrators or operators need to diagnose performance or health issues? A test failover allows you to bring online a clone of production systems for a realistic and isolated test lab.

Sponsored Content

Passwords Haven’t Disappeared Yet

123456. Qwerty. Iloveyou. No, these are not exercises for people who are brand new to typing. Shockingly, they are among the most common passwords that end users choose in 2021. Research has found that the average business user must manually type out, or copy/paste, the credentials to 154 websites per month. We repeatedly got one question that surprised us: “Why would I ever trust a third party with control of my network?

How a Test Failover Works

There are two elements to the test failover. There is a test virtual switch on the replica host to allow the test virtual machine to have network connectivity but remain isolated from production services in the primary site.

The second element is creating the test replica virtual machine. This creates a clone of the replica virtual machine. The machine configuration is identical except for:

  • Network connectivity: The virtual NIC will be connected to the pre-designated test virtual switch.
  • Virtual hard disks: Instead of slowly copying the virtual hard disks, differential disks are created and linked to the virtual hard disks of the replica VMs, working similarly to a checkpoint (or Hyper-V snapshot). This allows the test VM to be created quickly and use the disk contents of the replica VM as a starting point. The parent virtual hard disks are read from and newer data is written to and read from the differential virtual hard disks.

Hyper-V Replica Test Failover

How a test failover works using a linked-clone process.

Implement a Test Failover in Hyper-V Replica

The first step is to prepare the networking for a test failover.

  • Create one or more isolated virtual switches: These networks will be used to bring your test failover VMs online without causing address, name, or service conflicts with production systems. Create these networks on the hosts in the secondary site where you will perform the test failover.
  • Assign VMs to isolated virtual switches: Configure the connection of the virtual network in the replica VM for test purposes by expanding the properties of the VM’s virtual NIC, browsing to test failover and selecting the test failover virtual switch under Virtual Switch.

Not only is this approach quick to start up, but it also means that replication will continue uninterrupted – we wouldn’t want Mr. Murphy to cause a disaster during a BCP test and leave us hanging!

Hyper-V Replica Test Failover: configure virtual switch

Configuring a virtual switch for test failover.

  • Select the replica virtual machine you want to test in Hyper-V Recovery Manager (or Failover Cluster Manager) and select Replication > Test Failover. A window will pop up asking you which recovery point (historical copy) of the VM should be used for the failover. Only one option (the latest version) of the VM will be available if you didn’t enable historical copies.

The test failover VM is created with a suffix of “- Test.” You can power up and use the cloned virtual machine, testing that services will be operational and data will be available. Note that this VM will use any configured failover IP address that is configured in the replica VM’s NIC properties. The replica VM will remain offline and accepting replication changes from the primary site.

  • After the test, right-click on the replica VM (not the test VM) and select Replication > Stop Test Failover. The test VM will be destroyed without impacting the replica VM.

Related Topics:

Aidan Finn, Microsoft Most Valuable Professional (MVP), has been working in IT since 1996. He has worked as a consultant and administrator for the likes of Innofactor Norway, Amdahl DMR, Fujitsu, Barclays and Hypo Real Estate Bank International where he dealt with large and complex IT infrastructures and MicroWarehouse Ltd. where he worked with Microsoft partners in the small/medium business space.
Live Webinar - Thursday, December 2nd! Active Directory Masterclass: AD Configuration Strategies for Stronger SecurityREGISTER NOW - Thursday, December 2, 2021 @ 1 pm ET

Active Directory (AD) is leveraged by over 90% of enterprises worldwide as the authentication and authorization hub of their IT infrastructure—but its inherent complexity leaves it prone to misconfigurations that can allow attackers to slip into your network and wreak havoc. 

Join this session with Microsoft MVP and MCT Sander Berkouwer, who will explore:

  • Whether you should upgrade your domain controllers to Windows Server
    2019 and beyond
  • Achieving mission impossible: updating DCs within 48 hours
  • How to disable legacy protocols and outdated compatibility options in
    Active Directory

Sponsored by: