Configure Hyper-V Replica on Windows Server 2012

    All fiery mood!

    Today I would like to talk about a very interesting innovation that appeared in Windows Server 2012 , namely Hyper-V Replica. This technology is of practical interest - let's get to know it in more detail.




    What is the meaning of Hyper-V Replica?



    The point, as you might have guessed, is Hyper-V Replica in ... VM replication.
    The meaning of replication, I think is known to all. In this particular case, the Hyper-V Replica function is considered and positioned as a disaster tolerance mechanism built into Windows Server 2012.
    And you heard it right - it’s about disaster tolerance, but not about high availability - clustering functions are used for high availability in Windows Server 2012, but Hyper-V Replica is the mechanism that allows you to replicate a VM instance outside the data center site to a remote site.
    It should be noted right away that until WS2012, disaster-tolerant scenarios were implemented using the WS2008R2SP1 and SC2012 bundles, namely Orchestrator + DPM. From the point of view of the VM infrastructure, Hyper-V Replica greatly simplifies life - but nevertheless the optimal effect will be achieved in conjunction with System Center 2012 SP1 Orchestrator.

    Let's see how this mechanism is configured and works.

    Configure Hyper-V Replica



    First of all, you need to understand that this mechanism works on a point-to-point basis — that is, a specific VM is replicated from the main host or cluster to the remote backup host — both objects, of course, with the role of Hyper-V.
    First you need to configure the target host to receive replicated data.

    1) Launch Hyper-V Manager.
    2) Select the required, target host in Hyper-V Manager and go to its settings.
    3) Select the Replica Configuration item.
    4) Select the option Enable this computer as a Replica Server, as well as the method of data replication - via Kerberos (HTTP) or in a more secure way based on certificates (HTTPS).



    5) Next, you can choose the server from which you can receive replicas of the VM, as well as their target location. By default, we allow accepting replicas from any authenticated servers.
    6) Be sure to make sure that an exception is allowed in the firewall on the receiving host for Hyper-V Replica HTTP Listener (TCP-In) or Hyper-V Replica HTTPS Listener (TCP-In) - depending on your requirements.

    Now we need to configure the VM for replication.

    1) Select the VM you need for replication and right-click on it, then select Enable Replication .
    2) In the replication setup wizard that appears, click Next on the first dialog box, as well as on the next.
    3) Specify the FQDN name of the target server to which you intend to replicate the VM and click Next .
    4) Choose an authentication method (Kerberos or certificate-based) and whether to compress data during transmission. Click Next .
    5) Select the VM virtual disks you want to replicate and click Next .
    6) Configure recovery point parameters - will you use only the most current and only recovery point (Only the latest recovery point) or decide to use the ability to create several points with a given periodicity (Additional recovery points)- you decide. In the second case, you can specify the required number of recovery points, as well as the interval between their creation. WS2012 uses VSS in conjunction with incremental VM snapshots to provide replication mechanisms. After you have made your choice, click Next .



    7) Now you need to choose a mechanism for conducting primary replication - through the network, through an external medium, or use an existing VM on the target server. Select a replication start time and click Next .
    8) Review the settings summary and click Finish to complete the configuration process.

    To view the replication stats, click on the Replication tabon the necessary VM. Also now in the network settings of the VM you can set an alternative network configuration in case of a backup launch of the VM replica.
    There is also a fairly detailed video on replication

    Some precautions



    VM replication should not be used if there is a domain controller inside the VM, because if the replica is restored, the sequence of generating SID security keys inside the controller may fail. This can happen due to the fact that the replication mechanism asynchronously sends updates every 5 minutes - during this time the security keys can be updated, but on the replica - not yet. For such scenarios, it is recommended that you keep another instance of the domain controller on the backup site.
    And in general - the advice is this: if something you have replication mechanisms separate from the lower level (for example, the application is replicated itself, and the application level is higher than the container level with the VM - because this is the infrastructure level) - then it’s better to use these native mechanisms.

    In general, there is nothing complicated in setting up a VM replica.
    It remains only to check how it all works in a real environment - I will gladly listen to feedback from mega admins!

    PS> And of course, up-to-date and latest materials on Microsoft solutions can always be found on MVA !

    Sincerely,
    Fireman
    George A. Gadzhiev
    Information Infrastructure Expert
    Microsoft Corporation

    Also popular now: