Will both the primary and Replica servers be behind the same firewall? Because the Replica site is likely remote from the primary site, you should configure your firewall to allow replication data through. If the primary and Replica servers will be separated by a firewall, add Step 1.3 to your to-do list.

Will either the primary or Replica server be part of a failover cluster? If so, Replica needs a NetBIOS name and IP address to use as a connection point to the cluster. To enable this, install Hyper-V on each node of the cluster and configure a Hyper-V Replica Broker role for the cluster. If a failover cluster is involved in replication, add Step 1.4 to your to-do list.

Does the replication data sent between the primary and Replica servers need to be encrypted? To provide encrypted replication data transfer, Replica uses certificate-based authentication, so you must have or create an appropriate security certificate. For example, in any remote office or other cross-premises scenario, the data should probably be encrypted for security. However, if both the primary and Replica servers are physically co-located and are behind the same firewall, the built-in Kerberos authentication may be adequate.

Note

Kerberos authentication is only available when the primary and Replica servers are members of the same domain or in mutually trusted domains. Other scenarios require certificate-based authentication.

If the transmitted replication data must be encrypted, add Step 1.5 to your to-do list.

Which VHDs need to be replicated? VHDs that contain data that is rapidly changing and not used by the Replica server after failover, such as page file disks, should be excluded from replication to conserve network bandwidth. Make a note of which VHDs can be excluded from replication.

How many recovery points do you need? You can configure Replica to store only the latest received replication data; the data on the Replica server is updated according to the replication frequency you configure. You can also configure Replica to maintain an additional one or more recovery points, which are created once approximately every hour. Having additional recovery points also allows you to recover virtual machine operations to an earlier point in time when you perform a failover. A maximum of 15 (24 in Windows Server 2012 R2) such recovery points is possible. Make a note of the number of recovery points you need.

Do you need applications to remain consistent? The standard replication configuration maintains consistency in the state of the operating system of the replicated virtual machines after a failover, but not the state of applications that may be running in the virtual machine. To preserve the state of applications, you can choose to have Replica create additional application-consistent recovery points that use VSS on a set schedule. Make a note whether you need application-consistent recovery points.

Decide on the initial replication method. To start replicating data, Replica needs to transfer the current state of the virtual machines. This initial state can be transmitted directly over the existing network, either immediately or at a later time that you configure. You can also use a pre-existing restored virtual machine on the Replica server (for example, if you have restored an earlier backup of the virtual machine on the Replica server) as the initial copy. Or, you can save network bandwidth by copying the initial copy to external media and then physically delivering the media to the Replica site. Make a note of the initial replication method you plan to use.

Note

If you plan to use a pre-existing virtual machine restored from backup as the source for the initial replication, delete all previous snapshots associated with the virtual machine before you enable replication and start the initial replication.

(For Windows Server 2012 R2) Will you use extended replication? In extended replication, your Replica server forwards changes that occur on the primary virtual machines to a third server (the extended Replica server). After a planned or unplanned failover from the primary server to the Replica server, the extended Replica server provides further business continuity protection. Once you have completed Steps 1 through 5 to enable, configure, and test replication between the primary and Replica servers, see Step 6 for information about configuring and working with extended replication.

Hyper-V Replica is a feature of Hyper-V, so you must enable the Hyper-V server role if you aren’t already using it. Replica also requires virtual machines, so if you haven’t already done so, you need to create one or more. To enable the Hyper-V server role and create virtual machines, see Install Hyper-V and create a virtual machine.

Hyper-V Replica already includes firewall rules that will allow the replication data to pass through, but you do have to enable the appropriate exceptions. Follow the steps below depending on whether you plan to use Kerberos or certificate-based authentication on standalone (non-clustered) servers. If your servers are part of a failover cluster, run the Windows PowerShell cmdlets that follow the procedures on any node in the cluster to enable the firewall rules on all nodes in the cluster. These instructions only apply to Windows Firewall. If you are using a non-Microsoft firewall, different steps may be required.

For servers that are part of a failover cluster, run this Windows PowerShell cmdlet with admin privileges on any node in the cluster for Kerberos authentication The cmdlet must be run by a user with administrative privileges.

For servers that are part of a failover cluster, run this Windows PowerShell cmdlet with admin privileges on any node in the cluster for certificate authentication The cmdlet must be run by a user with administrative privileges.

Each node of the failover cluster that is involved in Replica must have the Hyper-V server role installed. If you haven’t already done so, refer to Step 1.2 in this topic and install the Hyper-V role on each cluster node.

Finally, configure the Hyper-V Replica Broker for the cluster with the following steps.

In Server Manager, open Failover Cluster Manager.

In the left pane, connect to the cluster, and while the cluster name is highlighted, click Configure Role in the Actions pane. The High Availability wizard opens

In the Select Role screen, select Hyper-V Replica Broker.

Complete the wizard, providing a NetBIOS name and IP address to be used as the connection point to the cluster (called a “client access point”). The Hyper-V Replica Broker is configured, resulting in a client access point name. Make a note of the client access point name for configuring Replica later on.

Verify that the Hyper-V Replica Broker role comes online successfully and can fail over between all nodes of the cluster. To do this, right-click the role, point to Move, and then click Select Node. Then, select a node, and then click OK.

Windows PowerShell equivalent commands

The following Windows PowerShell cmdlet or cmdlets perform the same function as the preceding procedure. Enter each cmdlet on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints.

This example sequence of cmdlets will create a Hyper-V Replica Broker names “HVR-Broker” that uses the static IP address 192.168.1.5. All steps must be completed by a user with administrative privileges.

If you configure Replica to use Kerberos authentication, the data transmitted from the primary to the Replica server is not encrypted. For the data to be encrypted, you should use certificate-based authentication. You can either provide an existing X.509v3 certificate or create a self-signed certificate.

If you are already using a certificate server or public key infrastructure (PKI) system, you can use an existing certificate, provided that it meets the following criteria:

The certificate must not be expired or revoked.

The certificate must include both client and server authentication extensions for enhanced key usage (EKU) and an associated private key.

The certificate must terminate at a valid root certificate in the Trusted Root Certification Authorities store on the Replica server.

If the virtual machine is hosted by a standalone server, the subject common name (CN) must be equal to (or the subject alternative name—DNS name) should contain the FQDN of the host. If the virtual machine is hosted by a failover cluster, the subject common name (CN) must be equal to (or the subject alternative name—DNS name) should contain the FQDN of the Hyper-V Replica Broker.

Although Hyper-V Replica will work if you configure only the Replica server (to receive replication from primary servers), it is a good practice to also configure the primary servers to receive replication. This allows you to reverse the replication direction after a failover, which provides replication protection for the newly active Replica server.

You configure a server to receive replication with Hyper-V Manager, which is available locally on any server that has Hyper-V installed or installable separately as part of the Remote Server Administration Tools (RSAT). Servers that are part of failover clusters use Failover Cluster Manager to also configure Hyper-V replication. With any of these tools, you can connect to the Replica server remotely to enable replication for it.

In Hyper-V Manager, click Hyper-V Settings in the Actions pane.

In the Hyper-V Settings dialog, click Replication Configuration.

In the Details pane, select Enable this computer as a Replica server.

In the Authentication and ports section, select the appropriate authentication method. For either authentication method, specify the port to be used (the default ports are 80 for Kerberos over HTTP and 443 for certificate-based authentication over HTTPS).

If you are using certificate-based authentication, click Select Certificate and provide the request certificate information.

In the Authorization and storage section, use the radio buttons to specify whether to allow any authenticated (primary) server to send replication data to this Replica server or to limit acceptance to data from specific primary servers. You can use wildcard characters to limit acceptance to servers from a particular domain without having to specify them all individually (for example, *.contoso.com). If you specify individual primary servers, you can designate a separate storage location for Replica data for each one, as well grouping them with the Trust Group tag.

Having configured the Hyper-V Replica Broker you enable replication directly from Failover Cluster Manager. If you haven’t configured the Hyper-V Replica Broker, follow the directions in Step 1.4. When you complete these steps, Replica is configured for all nodes of the cluster.

Note

If you use certificate-based authentication, ensure that each cluster node and the Hyper-V Replica Broker’s client access point all have appropriate machine certificates.

Note

If you use network address translation (NAT), ensure that the inbound and outbound ports are configured to use the same port number. Replica only listens on one port.

In Server Manager, open Failover Cluster Manager.

In the left pane, connect to the cluster, and while the cluster name is highlighted, click Roles in the Navigate category of the Details pane

Right-click the role and choose Replication Settings.

In the Details pane, select Enable this cluster as a Replica server.

In the Authentication and ports section, select the authentication method. For either authentication method, specify the port to be used (the default ports are 80 for Kerberos over HTTP and 443 for certificate-based authentication over HTTPS).

If you are using certificate-based authentication, click Select Certificate and provide the request certificate information.

In the Authorization and storage section, use the radio buttons to specify whether to allow any authenticated (primary) server to send replication data to this Replica server or to limit acceptance to data from specific primary servers. You can use wildcard characters to limit acceptance to servers from a particular domain without having to specify them all individually (for example, *.contoso.com). If you specify individual primary servers, you can designate a separate storage location for Replica data for each one, as well grouping them with the Trust Group tag.

Once the hosting server is configured for Replica, you can enable replication for each virtual machine that you want to be replicated. The details of replication are configured on a per-virtual-machine basis, so each one can have slightly different settings.

In the Details pane of Hyper-V Manager, select a virtual machine by clicking it.

Right-click the selected virtual machine and point to Enable Replication. The Enable Replication wizard opens.

On the Specify Replica Server page, in the Replica Server box, enter either the NetBIOS or fully qualified international domain name (FQIDN) of the Replica server that you configured in Step 2.1. If the Replica server is part of a failover cluster, enter the name of the Hyper-V Replica Broker that you configured in Step 1.4. Click Next.

On the Specify Connection Parameters page, the authentication and port settings you configured for the Replica server in Step 2.1 will automatically be populated, provided that Remote WMI is enabled. If it is not enabled, you will have to provide the values. Click Next.

On the Choose Replication VHDs page, clear the checkboxes for any VHDs that you want to exclude from replication, per your decision from 1.1. Make basic planning decisions, and then click Next.

On the Configure Recovery History page, select the number and types of recovery points to be created on the Replica server, per your decisions from 1.1. Make basic planning decisions, and then click Next.

Note

In Windows Server 2012 R2, this page of the wizard has been replaced by two pages: Configure Replication Frequency and Configure Additional Recovery Points.

On the Choose Initial Replication page, select the initial replication method to use per your decisions from 1.1. Make basic planning decisions. If you choose to have initial replication over the network occur at a later time, configure that here as well, and then click Next.

On the Completing the Enable Replication Relationship Wizard page, review the information in the Summary and then click Finish.

A dialog box appears indicating that replication was successfully enabled. In this dialog, click the Settings button and provide settings to configure the network that the virtual machine will connect to on the Replica server. The Replica virtual machine does not automatically connect to any network on the Replica server (after a failover) by default, so these settings are important. You can configure the network settings so that the virtual machine will connect to a different network after a failover to the Replica server than it used when it was on the primary server.

Note

The configuration data for a virtual machine is replicated only once, at the time of initial replication. After that point, you manage the primary and Replica virtual machines independently.

A Replica virtual machine is created on the Replica server. If you elected to send the initial copy over the network, the transmission begins either immediately or at the time you configured. If you elected to use external media for the initial copy, the necessary files are copied to a local location. Copy the files to the media you will use to transfer the initial copy and then send the media to the Replica site.

Using Hyper-V Manager or Windows PowerShell on the Replica server, perform initial replication for each virtual machine, using the files you sent to the Replica site.

This example sequence of cmdlets will enable and start replication for a virtual machine (“CRMVM”) that is hosted by a Replica server named “Recovery1.contoso.com”. In this example, Kerberos authentication is configured. All steps must be completed by a user with administrative privileges.

Hyper-V Replica normally sends changes that occur on the primary virtual machines to the Replica virtual machines, but after a failover, it can send the data the other direction. By doing this, when you fail over operations from the current primary server to the Replica server, the replication direction can be reversed back to the primary server from the Replica server once the primary has come back online. In this way, you provide replication protection for the Replica server which is now servicing the virtual machine load.

To do this, simply repeat the instructions to configure the Replica server on one or more of the primary servers, using the same settings you used for the Replica server.

To ensure that the replicated virtual machines (and applications running within them) will function properly on the Replica server just as they do on the primary server, you can conduct a test failover at any time. When you conduct a test failover, a temporary virtual machine is created on the Replica server. You can test any applications in that test virtual machine without interrupting the ongoing replication. When you conclude the test, the temporary virtual machine is deleted. Note that:

After failover the test virtual machine won’t be connected to any network. If you need to conduct tests that require a network, you can modify the settings of this test virtual machine in the same way you would modify settings of any ordinary virtual machine.

For a test failover to succeed, you must have enabled replication for at least one virtual machine and have completed the initial replication by any of the available methods. To verify failover with a recovery point other than the most recent one, replication must have been running long enough for at least one additional recovery point to have been created.

Access the Replica server, and in Hyper-V Manager, right-click the virtual machine you want to test failover for, point to Replication…, and then point to Test Failover….

Choose a recovery point to use. This creates and starts a virtual machine with the name “<virtual machine name>-Test” (for example, “CRMVM-Test”).

Conduct your tests on the test virtual machine. For example, you might verify that the virtual machine starts, pauses, and stops, and that any applications in the virtual machine run properly.

After you have concluded your testing, discard the test virtual machine by choosing Stop Test Failover under the Replication option.

Important

Operations that move the test virtual machine, such as quick migration, are not supported and could result in the test virtual machine becoming orphaned.

Windows PowerShell equivalent commands

The following Windows PowerShell cmdlet or cmdlets perform the same function as the preceding procedure. Enter each cmdlet on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints.

This example sequence of cmdlets will conduct a test failover of a virtual machine named “CRMVM”.

A planned failover is an operation in which you move operations on any primary virtual machine to its corresponding Replica virtual machine. For example, you might perform a planned failover in order to perform maintenance or upgrades on a primary virtual machine or when you have advance notice of an impending event that might require taking the primary server offline. You might also perform a planned failover to demonstrate and confirm readiness for a disaster recovery scenario.

In a planned failover, any un-replicated changes are first copied over to the Replica virtual machine, so no loss of data occurs. After the planned failover, the Replica virtual machine takes over the workload; to provide similar protection for the virtual machine that is now servicing the workload, you configure “reverse replication” to send changes back to the primary virtual machine (once that comes back online).

Start Hyper-V Manager on the primary server and choose a virtual machine to fail over. Turn off the virtual machine that you want to fail over.

Right-click the virtual machine, point to Replication, and then point to Planned Failover.

Click Fail Over to actually transfer operations to the virtual machine on the Replica server. Failover will not occur if the prerequisites have not been met.

Windows PowerShell equivalent commands

The following Windows PowerShell cmdlet or cmdlets perform the same function as the preceding procedure. Enter each cmdlet on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints.

This sequence of cmdlets will conduct a planned failover of the virtual machine “CRMVM,” provided you have already configured the primary server (in addition to the Replica server) to accept replication traffic using the procedure in Step 2. Run these cmdlets on the primary server:

After an unplanned failover you need to get your virtual machines back online. There is the possibility of data loss, since there was no opportunity to transmit changes on the primary virtual machines that might not have been replicated yet. Note that unlike failover clustering, Hyper-V Replica doesn’t automatically transfer to the virtual machines on the Replica server if the primary server goes offline.

Right-click the name of the virtual machine you want to use, point to Replication, and then point to Failover….

In the dialog that opens, choose the recovery snapshot you want the virtual machine to recover to, and then click Failover….. The Replication Status will change to Failed over – Waiting completion and the virtual machine will start using the network parameters you previously configured for it. If you have not previously configured the network parameters or if you want to use different parameters at this point, you can use the Windows PowerShell cmdlet below to do this.

Use the Complete-VMFailover Windows PowerShell cmdlet below to complete failover.

Repeat these steps for each virtual machine you want to bring back online.

Windows PowerShell equivalent commands

The following Windows PowerShell cmdlet or cmdlets perform the same function as the preceding procedure. Enter each cmdlet on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints.

Once the Replica virtual machine(s) are back online running on the Replica server, they are unprotected against further failure. You can provide this protection by enabling reverse replication back to the primary server once the server comes back online.

Note

The Replica virtual machines must be replicated back to their original primary server. Do not attempt to configure replication from the Replica server to a third server.

Open Hyper-V Manager and connect to the Replica server.

Right-click the name of the virtual machine you want to reverse replicate, point to Replication, and then point to Reverse replication…. The Reverse Replication wizard opens.

Complete the Reverse Replication wizard. You will find the requested information to be very similar if not identical to the information you provided in the Enable Replication wizard (see 2.3 Enable replication for virtual machines.

Windows PowerShell equivalent commands

The following Windows PowerShell cmdlet or cmdlets perform the same function as the preceding procedure. Enter each cmdlet on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints.

To reverse replication of the virtual machine, use the following example cmdlet:

In extended replication (available in Windows Server 2012 R2), your Replica server forwards changes that occur on the primary virtual machines to a third server (the extended Replica server). After a planned or unplanned failover from the primary server to the Replica server, the extended Replica server provides further business continuity protection. As with ordinary replication, you configure extended replication by using Hyper-V Manager, Windows PowerShell (using the –Extended option), or WMI.

Having the third server allows for new options for planned, unplanned, and test failovers, as well as different ways of moving the virtualized workload among the three servers. Once extended replication is established, you can do essentially all of the same things with the Replica and extended Replica servers just as you would with the primary server and the Replica server.

Because the roles of primary, Replica, and extended Replica can be exchanged among the various servers, to keep the explanations as clear as possible, in this topic we will assume a starting configuration of three servers: Server A, Server B, and Server C. This topic assumes that you have already configured standard replication along the lines of Steps 1-5 of this topic collection, where Server A is the primary server and Server B is the Replica server. The extended Replica server created in these steps will initially be Server C.

In Hyper-V Manager, connect to the Replica server (in the initial state of this example, Server B).

Right-click the virtual machine and point to Extend Replication. The Extend Replication wizard opens.

On the Specify Replica Server page, enter the name of the server you intend to use as the extended Replica (in this example, Server C; not the current Replica server, Server B).

Complete the wizard, providing values as you did when you originally configure replication between the primary and the Replica server. You can use different values for replication frequency, authentication method, and initial replication method than those you used for the basic replication configuration.

Note

There are certain differences in the Replica-extended Replica relationship as compared to the primary-Replica relationship:

You must use a longer replication frequency for extended replication than was configured for the primary-Replica relationship. Only frequencies of 5 or 15 minutes are supported for extended replication.

If you have configured application-consistent snapshots in the primary-Replica relationship, these snapshots are forwarded to the extended Replica. However, you cannot set a different frequency for the snapshots or enable application-consistent snapshots for extended replication independent of the primary-Replica relationship.

The collection of VHDs used in the primary-Replica relationship cannot be different in extended replication.

Windows PowerShell equivalent commands

The following Windows PowerShell cmdlet or cmdlets perform the same function as the preceding procedure. Enter each cmdlet on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints.

You extend replication with the same cmdlet used to enable ordinary replication. However, you run it from the current Replica server and use –ReplicaServerName to define the extended Replica server.

To monitor the status and statistics of extended replication, start Hyper-V Manager, right-click the Replica virtual machine, and then point to View Replication Health. To see the data for the extended replica, you must view the health report from the Replica server. From the primary server, you can only access the report for the primary replication relationship.

With Windows PowerShell, you can use the Measure-VMReplication cmdlet with the extra parameter –ReplicationRelationshipType. If you use the parameter without specifying a value, statistics for both the primary and extended replication are returned. To specify the extended replication relationship, use the parameter with the value Extended; for the primary relationship, use the value Simple.

Examples:

To view the statistics of the extended replication relationship from the Replica server:

Pausing and resuming extended replication works the same way as for primary replication. You can control primary and extended replication separately. If you access the Replica virtual machine with Hyper-V Manager, you will find separate options for pausing or resuming either the primary replication or the extended replication. If you access the extended Replica virtual machine, you will find pause and resume options for only the extended replication.

With Windows PowerShell, you can use the Suspend-VMReplication and Resume-VMReplication cmdlets with the extra parameter –ReplicationRelationshipType. To specify pausing or resuming the extended replication relationship, use the parameter with the value Extended; for the primary relationship, use the value Simple (which is the default if you don’t specify the replication relationship type.

In some circumstances, it is possible that replication could be in the “Resynchronization Required” state. If this occurs, you can use Hyper-V Manager to perform resynchronization immediately or schedule it for a later time. If the primary replication relationship is resynchronizing, extended replication will move into the Resynchronization Required state. When primary resynchronization is complete, extended resynchronization commences automatically.

You can also start resynchronization with Windows PowerShell.

Examples:

To resynchronize replication from the primary server when in Resynchronization Required state:

Test failovers from the Replica server to the extended Replica server work just as they do in a basic replication relationship. During the test failover, the relationship between the Replica server and the extended Replica server remains intact. During the test, you can also pause or resume operations between Replica and extended Replica.

Having an extended Replica server affords more options when you perform a planned failover. In a basic replication configuration (without an extended Replica server), once you perform a planned failover from Server A to Server B, you typically reverse replication from B to A to provide replication protection for B, which is now hosting the active virtualized workload.

With an extended Replica server, once you have completed a planned failover from A to B, B acts as the primary server, but you can either use C as its Replica server or reverse replication back to A.

Fail over to Server B and use Server C as the new Replica

Use Hyper-V Manager or Windows PowerShell to shut down the virtual machine on the primary server (in this example, Server A).

In the Planned Failover dialog box, clear Reverse the replication direction after failover checkbox and select the Start the Replica virtual machine after failover checkbox.

Click Fail Over.

After failover is complete, in Hyper-V Manager, right-click the virtual machine that is now on the Replica server (Server B) and point to Resume Extended Replication. This removes the replication relationship between Servers B and A; as result, B is now the primary server, and C is its Replica server.

To do this with Windows PowerShell, run Start-VMFailover –VMName <name> -Prepare on the primary server (Server A), then run Start-VMFailover –VMName <name> on Server B. The virtual machine is now failed over to Server B, which is the new primary server.

To use Server C as the new Replica server to protect Server B, run the following cmdlets on Server B:

In the Planned Failover dialog box, select the Reverse the replication direction after failover checkbox and select the Start the Replica virtual machine after failover checkbox.

After failover is complete, in Hyper-V Manager, right-click the virtual machine that is now on the Replica server (Server B) and point to Reverse Replication. This removes the extended replication relationship between Servers B and C; as result, B is now the primary server, and A is its Replica server.

To do this with Windows PowerShell, run Start-VMFailover –VMName <name> -Prepare on the primary server (Server A), then run Start-VMFailover –VMName <name> on Server B. The virtual machine is now failed over to Server B, which is the new primary server.

To use Server A as the new Replica server to protect Server B, run the following cmdlets on Server B:

In some circumstances, you might want to take both the primary and Replica servers (Servers A and B) offline, and have the extended Replica (Server C) maintain the virtualized workload.

Fail over completely to the extended Replica (Server C)

Shut down the virtual machine on the primary server (Server A), and then complete a planned failover to the Replica server (Server B) (see Step 4: Perform a Planned Failover).

Once failover to the Replica server is complete, complete a planned failover to the extended Replica server (Server C).

To do this with Windows PowerShell, run Start-VMFailover –VMName <name> -Prepare on the primary server (Server A), then run Start-VMFailover –VMName <name> and Complete-VMFailover –VMName <name>on Server B. The virtual machine is now failed over to Server B, which is the new primary server.

If the primary server (Server A) goes down, you can complete an unplanned failover to the Replica server (Server B) with Hyper-V Manager by right-clicking the virtual machine on Server B and pointing to Failover. In the dialog that opens, select a recovery point and click Fail Over.

To do this with Windows PowerShell, run Start-VMFailover –VMName <name> -VMRecoverySnapshot <VMSnapshot>.

Once failover to Server B is complete, you can choose to continue replication to Server C (to provide protection to Server B), or if Server A comes back online, reverse replication from Server B to Server A.

To continue replication to Server C, on Server B, right-click the virtual machine in Hyper-V Manager and point to Resume Extended Replication.

Note

This action removes replication between Servers A and B. Server B becomes the primary server and Server C becomes the Replica server. Replication from Server B to Server C goes into the resynchronization state and replication continues automatically once resynchronization is complete. The virtual machine on Server A becomes orphaned.

To do this with Windows PowerShell, run the following cmdlets on Server B:

At a later point, when all three servers are back online, you can restore each server to its original function by following these steps:

Remove replication from all three servers with Hyper-V Manager or Windows PowerShell.

Run the Enable Replication wizard on Server B, choosing Use an existing virtual machine on the Replica server as the initial copy.

Perform a planned failover from Server B to Server A.

Extend replication from Server B to Server C.

To reverse replication to Server A after the unplanned failover, on Server B, right-click the virtual machine in Hyper-V Manager and point to Reverse Replication. The extended replication relationship is removed; Server B becomes the primary server and Server A becomes the Replica server. The virtual machine on Server C is orphaned.

To do this with Windows PowerShell, on either Server A or Server B, run Set-VMReplication –VMName <name> -AsReplica. Then on Server B, run:

If a failover has shifted the virtualized workload to the extended Replica server (Server C in these examples), it is now functioning as the primary server. If both Server A and Server B go down, complete the unplanned failover to Server C with Hyper-V Manager by right-clicking the virtual machine on Server C and pointing to Failover. In the dialog that opens, select a recovery point and click Fail Over.

Once failover is complete, you have three options for putting the other servers back into service:

In Hyper-V Manager, access Server C, right-click the virtual machine, and then point to Reverse Replication.

If a primary replication relationship is detected on Server B, you will receive an error. If this occurs, remove the replication relationship on B, and then repeat the reverse replication step from Server C.

When reverse replication from Server C is complete, Server C will be the primary server, Server B is the Replica server, and the virtual machine on Server A is orphaned.

To restore the servers to their original roles

Perform a planned failover of the virtual machine from Server C to Server B.

Remove replication on all three servers.

Enable replication from Server B to Server A, choosing to Use an existing virtual machine on the Replica server as the initial copy

On Server B, run the Extend Replication wizard, to extend replication to Server C.

Repurpose the original primary server (Server A) to be a Replica server replicating Server C:

With Hyper-V Monitor, access Server A, right-click the virtual machine, and point to Remove Replication.

On Server B, run the Enable Replication wizard to set up replication to Server A, choosing to Use an existing virtual machine on the Replica server as the initial copy. If an orphaned virtual machine is still present on Server A, the wizard can use it as a data source to complete the initial replication.

To restore the servers to their original roles

Perform a planned failover of the virtual machine from Server C to Server A.

Remove replication on all three servers.

Enable replication from Server A to Server B, choosing to Use an existing virtual machine on the Replica server as the initial copy

Perform a planned failover from Server A to Server B, selecting the check box for enabling reverse replication.

On Server B, run the Extend Replication wizard, to extend replication to Server C.

You can remove extended replication with Hyper-V Manager by right-clicking the Replica virtual machine and then pointing to Replication. Point to Remove Replication and then select either Remove extended replication or Remove all replication. If you remove the replication relationship between the Replica and the extended Replica, changes in the virtual machine are no longer forwarded to the extended Replica, but the virtual machine on the extended Replica is not deleted.

Note

If you want to remove replication between the primary and the Replica, remove replication between the Replica and the extended Replica first.

With Windows PowerShell, use the Remove-VMReplication cmdlet with the parameter -ReplicationRelationshipType. Use the value Extended to remove extended replication or Simple to remove primary replication.