Kontakt

Mehr Informationen?

Wenn Sie an unseren Dienstleistungen, Tools, oder Softwareprojekten interessiert sind, zögern Sie nicht uns zu kontaktieren:

info(at)drvis.de

 

Blog

Hyper-V Replication in Windows Server 2012

Feb 1

Von: Peter Vogl
Freitag, 1. Februar 2013

We consider 2 stand-alone Hyper-V servers, HVSend (the sending server) and HVRec (the receiving server). We assume Hyper-V replication has been enabled.

How to set up replication to different volumes

Assume we wish to replicate VM1 on HVSend to \\HVRec\D$ and VM2 on HVSend to \\HVRec\E$.

  • In the Hyper-V Manager, select HVRec -> Hyper-V Settings -> Replication Configuration -> Specify the default location to store Replica Files -> D:\
  • Set up replication and wait until it is running
  • Now repeat step 1 but specify E:\. This setting does not affect previous choices.

 

How to use the various initialization methods for enabling or re-enabling replication

On HVSend, select VM1 and select Enable Replication. After selecting the receiving server, the method, the files that are to be replicated, and the number of recovery points, the wizard offers 3 choices for intial replication method:

 

  • (i) send initial copy over the network (default)
  • (ii) send initial copy using external media and specify the location
  • (iii) use an existing VM on the replica server as the initial copy (choos this option if you have restored a copy of this VM on the Replica server).

These choices are important to understand in case of failure. Assume you have enabled replication for VM1 on HVSend and, for some reason,  later decide to disable replication. Can you simply re-enable it? Answer: no, you cannot.

Assume you have enabled and later disabled replication and want to start over. First thing: you must delete the replicated VM1 in Hyper-V Manager: select HVRec, select the turned-off VM1 and select Delete. This does not delete the VM1 files on the hard disk of HVRec. In fact, on HVRec, you could simply select New-> Virtual Machine -> select VM1 and start it if needed. It is a complete VM from the time of last successful replication.

To re-enable replication from HVSend, (i) is the simplest and probably most efficient way to reestablish replication, even though it requires re-sending the entire VM across the network.

The method (ii) works as follows. Select HVSend and the running VM1 in the Hyper-V Manager. In the wizard for enabling replication, you select any file share as location. This share may actually lie on HVRec, say \\HVRec\Replication (permissions: Sharing Permissions: Full Control everyone. File permissions: Full control for HVSend$, HVRec$, Network Service). This initiates "Sending Initial replica" that you can watch in the Hyper-V Manager. Once this is finished, select HVRec in the Hyper-V Manager, then select the turned-off VM1, and select Replication -> Import Initial Replica -> select the File location (that has a name VM1_GUID) and click "Complete Initial Replication". This process takes quite a while (not clear whether this is faster than method (i)).

Method (iii) requires that you have previously exported VM1 to some location on HVRec. The procedure is cumbersome. Proceed as follows. Assume you have successfully enabled replication of VM1 on HVSend. This produces a turned-off version of VM1 on HVRec. Export VM1 on HVRec to some location on HVRec and wait until this completes. On HVSend, select the running VM1 and Remove replication. On HVRec, remove the turned-off VM1. This is important. Now, still on HVRec, import the previously exported VM1. Select HVSend and the running VM1 in the Hyper-V Manager, and enable Replication with method (iii).