共用方式為


Poster Companion Reference: Hyper-V Replica

 

Applies To: Windows Server 2012

This document is part of a companion reference that discusses the Windows Server 2012 Hyper-V Component Architecture Poster.

This document refers to the section titled “Hyper-V Replica” and discusses new features in Windows Server 2012, including virtual machine replication, initial replication methods, Replica server configuration, recovery history, and failover operations. It includes other related information as well.

You can obtain the Windows Server 2012 Hyper-V Component Architecture Poster from the Microsoft Download Center. This is a free resource. You can download it here:

https://www.microsoft.com/download/en/details.aspx?id=29189

1. Understanding Hyper-V Replica

Hyper-V Replica is new in Windows Server 2012. It is an asynchronous, virtual machine replication technology that is designed for business continuity and disaster recovery.

Using Hyper-V Replica, you can replicate a virtual machine from one location to another using just Hyper-V and a network connection, as illustrated in the following diagram. Hyper-V Replica works with any server vendor, any network vendor, or any storage vendor. Also, unlimited replication is available out of the box.

2. Hyper-V Replica Benefits

Hyper-V Replica can provide the following benefits to your organization:

  • Hyper-V Replica allows you, in the event of a failure at a primary site (for example, fire, power outage, or server failure), to fail over your production workloads to Replica servers at a secondary location with minimal downtime.

  • Configurations for the Hyper-V Replica server and storage hardware at each site do not have to be identical. Domain membership is also not required.

  • Hyper-V Replica provides the option to restore virtualized workloads to a point in time, depending on the recovery history selections for the virtual machine.

  • Hyper-V Replica provides the necessary management APIs that enable IT management vendors to build an enterprise disaster recovery solution for their customers.

  • Hyper-V Replica enables Infrastructure as a Service (IaaS) for hosting providers that host dedicated virtual servers for their customers.

3. Replica Server Requirements

You can use Hyper-V Replica on hardware certified for Windows Server 2012. To take advantage of Hyper-V Replica, which is included as part of the Hyper-V server role, the following prerequisites must be met:

  • Hardware that supports the Hyper-V role on Windows Server 2012. Keep in mind that hardware-assisted virtualization is available in processors that include a virtualization option—specifically processors with Intel Virtualization Technology (Intel VT) or AMD Virtualization (AMD-V) technology. In addition, hardware-enforced Data Execution Prevention (DEP) must be available and enabled.

  • Sufficient storage on both the primary server and Replica server to host the files used by virtualized workloads.

  • Network connectivity between the locations hosting the primary and Replica servers.

  • Properly configured firewall rules to permit replication between the primary and Replica sites.

  • You need to use certificate-based authentication if you want transmitted data to be encrypted. Use an X.509 v3 certificate to support mutual authentication with certificates.

4. Hyper-V Installation Considerations

Consider the following as you are learning about Hyper-V Replica. For more information, see Install the Hyper-V Role and Configure a Virtual Machine.

  • Hyper-V Replica is implemented as part of the Hyper-V role. You can enable the Hyper-V role on a stand-alone server running Hyper-V or on servers that are members of a failover cluster. Servers running Hyper-V can function as members of a workgroup, or as member servers in the same or different Active Directory domains.

  • The primary and Replica servers do not need to be part of the same Active Directory domain unless the Hyper-V role is enabled on servers that are members of a failover cluster.

  • You can enable the Hyper-V role using Server Manager or using Windows PowerShell. The Hyper-V role has no dependencies on any other server roles. Installing the Hyper-V role also installs Hyper-V Manager (which is included in Remote Server Administration Tools (RSAT)).

5. Hyper-V Replica Terms

This article refers to the following terms when describing Hyper-V Replica technology.

Term Definition
replication The ongoing process of sending data changes that have occurred on a primary virtual machine to the equivalent Replica virtual machine.
primary server The server running Hyper-V that hosts your virtualized production workloads.
primary virtual machine A virtual machine running on the primary server that is participating in Hyper-V replication.
Replica server The server that hosts virtual machines that is maintained in reserve in the event that the primary server (and its primary virtual machines) must go offline.

The Replica virtual machines are kept up to date with any changes that occur on the primary virtual machines by the process of replication.

You can configure and manage Replica servers using Hyper-V Manager or Windows PowerShell.
Replica virtual machine A virtual machine running on the Replica server that receives changes that are detected on the corresponding primary virtual machine.
planned failover A controlled event where you move a virtual machine from the primary site to the Replica site.
unplanned failover An unplanned event that occurs when the primary site experiences a problem and the Replica virtual machines are brought online at the Replica site.
application-consistent replication Replication that allows recovery to a point in time that is consistent from the perspective of applications. To accomplish this, the Volume Shadow Copy Service (VSS) is used.

6. Hyper-V Replica and Live Migration

Some people are initially confused about when to use Hyper-V Replica and when to use Hyper- V live migration. Hyper-V Replica keeps up-to-date copies of your virtual machines in case of a disaster, and allows you to switch to those copies when required. This is usually an unplanned event (although you can perform a planned failover with Hyper-V Replica, as described in the 5. Hyper-V Replica Terms section). However, Hyper-V live migration is about planned events— moving your virtual machines and their associated storage across different locations when required. For more information about live migration in Windows Server 2012, see What’s New in Hyper-V.

7. Virtual Machine Replication

The great advantage of Hyper-V Replica is that it provides virtual machine replication for any of your servers, networks, or storage vendors. It does not require a failover cluster or any shared storage. You can replicate individual or multiple virtual machines.

You can replicate your virtual machines from one computer running Hyper-V at a primary site (the primary server) to another computer running Hyper-V at a Replica site (the Replica server). Keep in mind that your Replica server can accept incoming replication traffic from one or more primary servers. This is illustrated below:

8. Enabling Replication on the Replica Server

Before you can use Hyper-V Replica, you must enable your server running Hyper-V to be a Replica server. After you set up your Replica server, it can accept incoming replication traffic from the virtual machines on one or more primary servers.

You can enable a Replica server using Hyper-V Manager or Windows PowerShell. It is not necessary to independently remotely connect to your Replica server to perform this configuration.

9. Initial Virtual Machine Replication

Using Hyper-V Replica, an initial copy of all your virtual hard disks (VHDs) must be transferred to the Replica server (at your Replica site). This operation needs to happen before regular replication operations can start. Hyper-V Replica provides three different options for initial virtual machine replication.

The first option is to transfer your selected virtual hard disks over the network to your Replica server. Using network replication, you can start your initial replication immediately or schedule it to happen at a specified time.

Hyper-V Replica also gives you the option of using an existing backup copy on the Replica server. This means you can transfer a backup copy of your production virtual machine to your Replica server.

Finally, Hyper-V Replica gives you the option of using external media. You can copy your selected VHDs to external media and deliver the external media to the Replica site. This is especially useful if your business operates in areas of expensive connectivity, or if you have to manage remote or regional server locations.

10. Replicating Virtual Machine Changes

After you have configured and performed the initial virtual machine replication, Hyper-V Replica sends out virtual machine changes on a frequent schedule. These changes are tracked in a log file, which is compressed before it is sent to the Replica server. On the primary server, changes are maintained in an “.hrl” file that is in the same location as the VHDs that are being replicated. You can compress the virtual machine data when you replicate virtual Primary Server.hrl Files(Compressed)Replica Server machine changes across the network.

11. Replica Server Authentication

After you enable a Replica server for virtual machine replication, you configure specific authentication types and ports for incoming replication traffic.

You have two authentication options. You can use Kerberos authentication (using HTTP), but the data you send across the network will not be encrypted. You can also choose certificate-based authentication (using HTTPS), and the data sent across the network will be encrypted.

12. Replica Server Authorization

After you have decided upon authentication types, you must specify which primary servers are permitted to replicate virtual machines to your Replica server. You can allow authorization from any authenticated server, or you can specify a primary server. In both cases, Hyper-V Replica allows you to designate a specific location to store your recovery virtual machine files—for example, on a SAN, on an SMB file server, or using direct-attached storage.

13. Replication Firewall Rules

Properly configured firewall rules permit replication between the primary and Replica servers and sites. To allow any incoming virtual machine replication traffic for configured replication ports, you must ensure an inbound firewall rule is created.

14. Recovery History

If you need to restore a virtual machine, Hyper-V uses a recovery point. The recovery points contain one or more snapshots. You have the option of just keeping the latest recovery point for restoring your primary virtual machine on the Replica server, or you can choose to maintain multiple recovery points on your server. If you choose multiple recovery points, keep in mind that you will need more storage on the Replica server. When you specify the number of recovery points you want to keep, the Enable Replication Wizard specifies how much storage is needed. Recovery points are created every hour, but the Replica server receives frequent and regular changes from the primary server, so that your primary and Replica servers stay synchronized.

It is important to understand that if multiple recovery points are not configured, your server will only maintain the latest recovery point for the Replica virtual machine.

You can also choose to take application-consistent snapshots at a specified interval. They use the Volume Shadow Copy Service (VSS). This is useful, but keep in mind that when you take snapshots of your applications running on the primary virtual machine, it will have a performance impact on those applications as the snapshots are created.

15. Hyper-V Replica Failover Operations

Hyper-V Replica is designed to help you in both planned (scheduled events) and unplanned (disaster recovery) failover situations. With Hyper-V Replica, you can fail over to a protected virtual machine on the Replica server at any time. There are three main options you need to understand for failover operations. Note that you can configure and manage Replica servers using Hyper-V Manager or Windows PowerShell.

Planned Failover to a Replica Server

A planned failover operation enables you to fail over your production virtual machine to a Replica server as part of a predetermined schedule. You might want to do this for multiple reasons—for example, to test the state of your Replica virtual machine. This allows you to make appropriate arrangements in your organization if they are required. We recommend that you perform planned failovers for off-business hours.

There are several prerequisites when you perform a planned failover. Your virtual machine must not be running, and your server running Hyper-V at the primary site must be enabled to receive replication traffic from the Replica server. Keep in mind that a planned failover also initiates a “reverse replication.” Reverse replication is the process where replication is established from a virtual machine that was formerly a Replica virtual machine, but is now a primary virtual machine as the result of a failover. You can also perform a planned failover using Windows PowerShell.

Test Failover to a Replica Server

Hyper-V Replica is continually updating the Replica server to ensure that the primary virtual machine matches the Replica virtual machine as closely as possible. If you want to, you can test a Replica virtual machine on the Replica server. You can conduct a test failover operation at any time without interrupting ongoing replication. This process creates and starts a virtual machine with the name “<virtual machine name> - Test”.

Unplanned Failover to a Replica Server

In the event of a failure in the primary site, you can bring up the Replica virtual machine on the Replica server. When you configured your Replica server in the Enable Replication Wizard, you had the option of specifying multiple recovery points. Now, you can select the one you require to restore the specified the virtual machine.

You can also start your Replica virtual machine in an unplanned failover using Windows PowerShell.

16. Windows PowerShell Cmdlets for Hyper-V Replica

Windows PowerShell is an integral part of Windows Server 2012 and can be used to build, administer, and troubleshoot your own environment.

We have published a list of Windows PowerShell cmdlets for managing Replica servers. See the Hyper-V cmdlet reference, which includes cmdlet descriptions, syntax, and examples.

17. Additional Hyper-V Replica Resources

For more information about Hyper-V Replica, see the following in the Hyper-V section of the Windows Server 2012 Technical Library:

18. Windows Server Component Architecture Posters

To download the Windows Server 2012 poster, see Windows Server 2012 Hyper-V Component Architecture in the Microsoft Download Center. If you want to reference the previous component architecture posters that relate to Hyper-V in Windows Server 2008 R2, please see the following posters.

Windows Server 2008 R2: Hyper-V Component Architecture

The Windows Server 2008 R2: Hyper-V Component Architecture poster provides a visual reference for understanding key Hyper-V technologies in Windows Server 2008 R2. It focuses on architecture, snapshots, live migration, virtual networking, storage, and import/export.

You can use this poster in conjunction with the previously published Windows Server 2008 R2 Feature Components Poster.

Windows Server 2008 R2 Hyper-V Component Architecture (with Service Pack 1)

This Windows Server 2008 R2 Hyper-V Component Architecture (with Service Pack 1) poster provides a visual reference for understanding key Hyper-V technologies in Windows Server 2008 R2 with Service Pack 1. It focuses on architecture, snapshots, live migration, virtual networking, storage, RemoteFX®, and Dynamic Memory.

You can also use this poster in conjunction with the previously published Windows Server 2008 R2 Feature Components Poster.

Windows Server 2008 R2 Feature Components Poster

The Windows Server 2008 R2 Feature Components Poster provides a visual reference for understanding key technologies in Windows Server 2008 R2. It focuses on Active Directory® Domain Services, Hyper-V, Internet Information Services, Remote Desktop Services (including Virtual Desktop Infrastructure (VDI)), BranchCache®, and DirectAccess technologies. In addition, updates to core file services and server management are illustrated.

You can use this poster in conjunction with the Windows Server 2008 and Windows Server 2008 R2 component posters.

Remote Desktop Services Component Architecture Poster

The Remote Desktop Services Component Poster provides a visual reference for understanding key Remote Desktop Services technologies in Windows Server 2008 R2. It explains the functions and roles of Remote Desktop Session Host, Remote Desktop Virtualization Host, Remote Desktop Connection Broker, Remote Desktop Web Access, Remote Desktop Gateway, Remote Desktop Licensing, and RemoteFX.

You can use this poster in conjunction with the Windows Server 2008 and Windows Server 2008 R2 component posters.