Windows Server 2012 Hyper-V Replica … In Detail

If you asked me to pick the killer feature of WS2012 Hyper-V, then Replica would be high if not at the top of my list (64 TB VHDX is right up there in the competition).  In Ireland, and we’re probably not all that different from everywhere else, the majority of companies are in the small/medium enterprise (SME) space and the vast majority of my customers work exclusively in this space.  I’ve seen how DR is a challenge to enterprises and to the SMEs alike.  It is expensive and it is difficult.  Those are challenges an enterprise can overcome by spending, but that’s not the case for the SME.

Virtualisation should help.  Hardware consolidation reduces the cost, but the cost of replication is still there.  SAN’s often need licenses to replicate.  SAN’s are normally outside of the reach of the SME and even the corporate regional/branch office.  Software replication which is aimed at this space is not cheap either, and to be honest, some of them are more risky than the threat of disaster.  And let’s not forget the bandwidth that these two types of solution can require.

Isn’t DR Just An Enterprise Thing?

So if virtualisation mobility and the encapsulation of a machine as a bunch of files can help, what can be done to make DR replication a possibility for the SME?

Enter Replica (Hyper-V Replica), a built-in software based asynchronous replication mechanism that has been designed to solve these problems.  This is what Microsoft envisioned for Replica:

  • If you need to replicate dozens or hundreds of VMs then you should be using a SAN and SAN replication.  Replica is not for the medium/enterprise sites.
  • Smaller branch offices or regional offices that need to replicate to local or central (head office or HQ data centre) DR sites.
  • SME’s who want to replicate to another office.
  • Microsoft partners or hosting companies that want to offer a service where SME’s could configure important Windows Server 2012 Hyper-V host VMs to replicate to their data centre – basically a hosted DR service for SMEs.  Requirements of this is that it must have Internet friendly authentication (not Kerberos) and it must be hardware independent, i.e. the production site storage can be nothing like the replica storage.
  • Most crucially of all: limited bandwidth.  Replica is designed to be used on commercially available broadband without impacting normal email or browsing activity – Microsoft does also want to sell them Office 365, after all Smile How much bandwidth will you need?  How long is a piece of string?  Your best bet is to measure how much change there is to your customers VMs every 5 minutes and that’ll give you an idea of what bandwidth you’ll need.

Figure 1  Replicate virtual machines

In short, Replica is designed and aimed at the ordinary business that makes up 95% of the market, and it’s designed to be easy to set up and invoke.

What Hyper-V Replica Is Not Intended To Do

I know some people are thinking of this next scenario, and the Hyper-V product group anticipated this too.  Some people will look at Hyper-V Replica and see it as a way to provide an alternative to clustered Hyper-V hosts in a single site.  Although Hyper-V Replica could do this, it is not intended for for this purpose.

The replication is designed for low bandwidth, high latency networks that the SME is likely to use in inter-site replication.  As you’ll see later, there will be a delay between data being written on host/cluster A and being replicated to host/cluster B.

You can use Hyper-V Replica within a site for DR, but that’s all it is: DR.  It is not a cluster where you fail stuff back and forth for maintenance windows – although you probably could shut down VMs for an hour before flipping over – maybe – but then it would be quicker to put them in a saved state on the original host, do the work, and reboot without failing over to the replica.

How It Works

I describe Hyper-V Replica as being a storage log based asynchronous disaster recovery replication mechanism.  That’s all you need to know …

But let’s get deeper Smile

How Replication Works

Once Replica is enabled, the source host starts to maintain a HRL (Hyper-V Replica Log file) for the VHDs.  Every 1 write by the VM = 1 write to VHD and 1 write to the HRL.  Ideally, and this depends on bandwidth availability, this log file is replayed to the replica VHD on the replica host every 5 minutes.  This is not configurable.  Some people are going to see the VSS snapshot (more later) timings and get confused by this, but the HRL replay should happen every 5 minutes, no matter what.

The HRL replay mechanism is actually quite clever; it replays the log file in reverse order, and this allows it only to store the latest writes.  In other words, it is asynchronous (able to deal with long distances and high latency by write in site A and later write in site B) and it replicates just the changes.

Note: I love stuff like this.  Simple, but clever, techniques that simplify and improve otherwise complex tasks.  I guess that’s why Microsoft allegedly ask job candidates why manhole covers are circular Smile

As I said, replication or replay of the HRL will normally take place every 5 minutes.  That means if a source site goes offline then you’ll lose anywhere from 1 second to nearly 10 minutes of data.

I did say “normally take place every 5 minutes”.  Sometimes the bandwidth won’t be there.  Hyper-V Replica can tolerate this.  After 5 minutes, if the replay hasn’t happened then you get an alert.  The HRL replay will have another 25 minutes (up to 30 completely including the 5) to complete before going into a failed state where human intervention will be required.  This now means that with replication working, a business could lose between 1 second and nearly 1 hour of data.

Most organisations would actually be very happy with this. Novices to DR will proclaim that they want 0 data loss. OK; that is achievable with EUR100,000 SANs and dark fibre networks over short distances. Once the budget face smack has been dealt, Hyper-V Replica becomes very, very attractive.

That’s the Recovery Point Objective (RPO – amount of time/data lost) dealt with.  What about the Recovery Time Objective (RTO – how long it takes to recover)?  Hyper-V Replica does not have a heartbeat.  There is not automatic failover.  There’s a good reason for this.  Replica is designed for commercially available broadband that is used by SMEs.  This is often phone network based and these networks have brief outages.  The last thing an SME needs is for their VMs to automatically come online in the DR site during one of these 10 minute outages.  Enterprises avoid this split brain by using witness sites and an independent triangle of WAN connections.  Fantastic, but well out of the reach of the SME.  Therefore, Replica will require manual failover of VMs in the DR site, either by the SME’s employees or by a NOC engineer in the hosting company.  You could simplify/orchestrate this using PowerShell or System Center Orchestrator.  The RTO will be short but have implementation specific variables: how long does it take to start up your VMs and for their guest operating systems/applications to start?  How long will it take for you to get your VDI/RDS session hosts (for remote access to applications) up, running and accepting user connections?  I’d reckon this should be very quick, and much better with the 4-24 hours that many enterprises aim for.  I’m chuckling as I type this; the Hyper-V group is giving SMEs a better DR solution than most of the Fortune 1000’s can realistically achieve with oodles of money to spend on networks and storage replication, regardless of virtualisation products.

A common question I expect: there is no Hyper-V integration component for Replica.  This mechanism works at the storage level, where Hyper-V is intercepting and logging storage activity.

Replica and Hyper-V Clusters

Hyper-V Replica works with clusters.  In fact you can do the following replications:

  • Standalone host to cluster
  • Cluster to cluster
  • Cluster to standalone host

The tricky thing is the configuration replication and smooth delegation of replication (even with Live Migration and failover) of HA VMs on a cluster.  How can this be done?  You can enable a HA role called a Hyper-V Replica Broker on a cluster (once only).  This is where you can configure replication, authentication, etc, and the Broker replicates this data out to cluster nodes.  Replica settings for VMs will travel with them, and the broker ensures smooth replication from that point on.

Configuring Hyper-V Replica

I don’t have my lab up and running yet, but there are already many step-by-step posts out there.  I wanted to focus on the how it works and why to use it.  But here are the fundamentals:

On the replica host/cluster, you need to enable Hyper-V Replica.  Here you can control what hosts (or all) can replicate to this host/cluster.  You can do things like have one storage path for all replicas, or creating individual policies based on source FQDN such as storage paths or enabling/pausing/disabling replication.

You do not need to enable Hyper-V Replica on the source host.  Instead, you configure replication for each required VM.  This includes things like:

  • Authentication: HTTP (Kerberos) within the AD forest, or HTTPS (destination provided SSL certificate) for inter-forest (or hosted) replication.
  • Select VHDs to replicate
  • Destination
  • Compressing data transfer: with a CPU cost for the source host.
  • Enable VSS once per hour: for apps requiring consistency – not normally required because of the logging nature of Replica and it does cause additional load on the source host
  • Configure the number of replicas to retain on the destination host/cluster: Hyper-V Replica will automatically retain X historical copies of a VM on the destination site.  These are actually Hyper-V snapshots on the destination copy of the VM that are automatically created/merged (remember we have hot-merge of the AVHD in Windows 8) with the obvious cost of storage.  There is some question here regarding application support of Hyper-V snapshots and this feature.

Initial Replication Method

I’ve worked in the online backup business before and know how difficult the first copy over the wire is.  The SME may have small changes to replicate but might have TBs of data to copy on the first synchronisation.  How do you get that data over the wire?

  • Over-the-wire copy: fine for a LAN, if you have lots of bandwidth to burn, or if you like being screamed at by the boss/customer.  You can schedule this to start at a certain time.
  • Offline media: You can copy the source VMs to some offline media, and import it to the replica site.  Please remember to encrypt this media in case it is stolen/lost (BitLocker-To-Go), and then erase (not format) it afterwards (DBAN).  There might be scope for an R2/Windows 9 release to include this as part of a process wizard.  I see this being the primary method that will be used.  Be careful: there is no time out for this option.  The HRL on the source site will grow and grow until the process is completed (at the destination site by importing the offline copy).  You can delete the HRLs without losing data – it is not like a Hyper-V snapshot (checkpoint) AVHD.
  • Use a seed VM on the destination site: Be very very careful with this option.  I really see it as being a great one for causing calls to MSFT product support.  This is intended for when you can restore a copy of the VM in the DR site, and it will be used in a differencing mechanism where the differences will be merged to create the synch.  This is not to be used with a template or similar VMs.  It is meant to be used with a restored copy of the same VM with the same VM ID.  You have been warned.

And that’s it.  Check out the social media and you’ll see how easy people are saying Hyper-V Replica is to set up and use.  All you need to do now is check out the status of Hyper-V Replica in the Hyper-V Management Console, Event Viewer (Hyper-V Replica log data using the Microsoft-Windows-Hyper-V-VMMSAdmin log), and maybe even monitor it when there’s an updated management pack for System Center Operations Manager.

Failover

I said earlier that failover is manual.  There are two scenarios:

  • Planned: You are either testing the invocation process or the original site is running but unavailable.  In this case, the VMs start in the DR site, there is guaranteed zero data loss, and the replication policy is reversed so that changes in the DR site are replicated to the now offline VMs in the primary site.
  • Unplanned: The primary site is assumed offline.  The VMs start in the DR site and replication is not reversed. In fact, the policy is broken.  To get back to the primary site, you will have to reconfigure replication.Can I Dispense With Backup?No, and I’m not saying that as the employee of a distributor that sells two competing backup products for this market.  Replication is just that, replication.  Even with the historical copies (Hyper-V snapshots) that can be retained on the destination site, we do not have a backup with any replication mechanism.  You must still do a backup, as I previously blogged, and you should have offsite storage of the backup.Many will continue to do off-site storage of tapes or USB disks.  If your disaster affects the area, e.g. a flood, then how exactly will that tape or USB disk get to your DR site if you need to restore data?  I’d suggest you look at backup replication, such as what you can get from DPM:

     

    The Big Question: How Much Bandwidth Do I Need?

  • Ah, if I knew the answer to that question for every implementation then I’d know many answers to many such questions and be a very rich man, travelling the world in First Class.  But I am not.

    There’s a sizing process that you will have to do.  Remember that once the initial synchronisation is done, only changes are replayed across the wire.  In fact, it’s only the final resultant changes of the last 5 minutes that are replayed.  We can guestimate what this amount will be using approaches such as these:

    • Set up a proof of concept with a temporary Hyper-V host in the client site and monitor the link between the source and replica: There’s some cost to this but it will be very accurate if monitored over a typical week.
    • Do some work with incremental backups: Incremental backups, taken over a day, show how much change is done to a VM in a day.
    • Maybe use some differencing tool: but this could have negative impacts.

    Some traps to watch out for on the bandwidth side:

    • Asynchronous broadband (ADSL):  The customer claims to have an 8 Mbps line but in reality it is 7 Mbps down and 300kbps up.  It’s the uplink that is the bottleneck because you are sending data up the wire.  Most SME’s aren’t going to need all that much.  My experience with online backup verifies that, especially if compression is turned on (will consume source host CPU).
    • How much bandwidth is actually available: monitor the customer’s line to tell how much of the bandwidth is being consumed or not by existing services.  Just because they have a functional 500 kbps upload, it doesn’t mean that they aren’t already using it.

    Very Useful Suggestion

    Think about your servers for a moment.  What’s the one file that has the most write activity?  It is probably the paging file.  Do you really want to replicate it from site A to site B, needlessly hammering the wire?

    Hyper-V Replica works by intercepting writes to VHDs.  It has no idea of what’s inside the files.  You can’t just filter out the paging file.  So the excellent suggestion from the Hyper-V product group is to place the paging file of each VM onto a different VHD, e.g. a SCSI attached D drive.  Do not select this drive for replication.  When the VMs are failed over, they’ll still function without the paging file, just not as well.  You can always add one after if the disaster is sustained.  The benefit is that you won’t needlessly replicate paging file changes from the primary site to the DR.

    Summary

    I love this feature because it solves a real problem that the majority of businesses face.  It is further proof that Hyper-V is the best value virtualisation solution out there.  I really do think it could give many Microsoft Partners a way to offer a new multi-tenant business offering to further reduce the costs of DR.

    EDIT:

    I have since posted a demo video of Hyper-V Replica in action, and I have written a guest post on Mary Jo Foley’s blog.

    EDIT2:

    I have written around 45 pages of text (in Word format) on the subject of Hyper-V Replica for a chapter in the Windows Server 2012 Hyper-V Installation and Configuration Guide book. It goes into great depth and has lots of examples. The book should be out Feb/March of 2013 and you can pre-order it now:

     

    82 thoughts on “Windows Server 2012 Hyper-V Replica … In Detail”

    1. Hi Aidan, appreciate your blog post on the subject, as this is of particular interest to me. I wonder if you could clarify a few things you raise?

      Under the “What Hyper-V Replica Is Not Intended To Do” section, you state that Replica is only for DR and not a stretched cluster of sorts for pseudo Live Migration like functionality. This sort of conflicts with what you say in the “failover” section where you state that there is “guaranteed zero data loss” during a planned failover. Does this mean Replica could be used for this sort of maintenance fail over functionality, but it is just not a recommended use case? Can you go into a bit more detail about why for instance, you couldn’t fail over production workloads during the day?

      Also, I’m curious about the “strain” placed on hosts by Replica. Is there/will there be any guidance from Microsoft regarding a practical limit? For instance, like previous limits of nodes per cluster; guest VHDX files per host protected by Replica?

      1. No, Hyper-V Replica is not intended for maintenance failover. It is zero data loss, in a manner, but it replicates every 5 minutes (assuming the network is up to it). It is not intended to replace a cluster. If you need a cluster, then you need a cluster. And also remember that we have Shared-Nothing Live Migration in Windows Server 8 Hyper-V – the ability to LM VMs between non-clustered hosts. That obviously won’t be as quick as normal (shared storage) LM because the VHD(X) files must be syncd/moved across the network.

        1. We have been testing replication for a little while and have tested as a maintenance failover. Of course, it is planned. all we did was tell people to not be on the system during the maintenance window, failover to the replica and then let the people work on that for a while, then they get off once more later that night and then have the replica replicate back to the original. It automatically shuts down the replica and starts the original. Of course, this is in a test lab. We have not tested it on a live network.

    2. Sorry forgot to ask if I really need VPN or DirectAccess for replication via WAN link between 2 hyper-v 3.0 on each site ?

      Emmanuel

    3. As mentioned this is geared to be a low cost solution for the SMB space.
      What are Microsoft’s plans around providing similar capability to what VMware offers with SRM? SRM provides not only automated failover workflows for VMs from one site to another (SAN or Host based replication) it also allows isolated testing of those workflows with automated teardown of the test environment.
      I don’t see how that can be accomplished with Hyper-V replica.
      I assume one could build something with Orchestrator and SCVMM but nothing out of box like SRM.

      1. I guess you don’t pay the bills, Shawn. There is nothing out-of-the-box about $RM. You can write a simple PowerShell script (and it is simple) or you can create an Orchestrator runbook as was demonstrated at TechEd today.

    4. Thanks for this post Aidan. Just had some follow up questions on this.

      1. How dissimilar can the source host and destination hosts be? For instance, can the hosts be on different subnets, have different storage (maybe source has SAN array and the destination has DAS), and have different physical specs like CPU/memory/etc.

      2. What are the MS licensing requirements on the destination host? Since it acts like a passive DR node, does it have to be licensed exactly like the source host?

      3. What about VMs that you want to replicate that have specific networking needs. For example, Exchange in a DAG needs a MAPI network and a Replication network. I’m guessing those same networks need to be available on the destination host? Or maybe that’s a bad example since you might want to replicate a DAG based VM differently, but if you had a VM that had multiple vNICs, then those same virtual networks will need to be available on the destination host/network too correct?

      Any thoughts would be appreciated, thanks.

      1. 1) Totally different. Different storage, different networks (IP injection), clustered or not, etc.
        2) Depends. Internal: yes, license it for the max number of VMs that can be on the host. Hosted environment … might be free Hyper-V Server + SA benefits, or SPLA.
        3) Yes. And remember, we have IP injection to handle different IPs. Alternatively, we might be able to use Network Virtualisation to abstract the networks.

    5. Hi Aidan,
      From a DR point of view, and I completely understand this isn’t a backup, would it be possible to replicate a replica?

      What I’m planning is there are two hosts that are running a total of 3 vm’s:
      vm1 on host1 will replicate to host2
      vm2 and vm3 on host2 will replicate to host1
      Will I be able to replicate to a basic box with hyper-v server 2012 running at a DR site (well the MD’s home)?

      The plan is if a physical box goes down I can bring up the replicate on site, if both go down then we have VM’s that are ready to be placed on hardware capable of running them and at most lost 10 minutes, well as long as there’s no interruption as you stated.

      Sorry for the long question and only recently found your blog, thanks for taking the time to make this stuff easier to understand.

    6. Hi Aidan,

      Thanks for the awesome article, you’ve answered a heap of my questions already but I was hoping you could help with two tricky questions I’ve got for you.

      1. Can you set up Hyper-V Server 2012 as a replicate server to replicate your windows server 2012 VMs too? (I’m talking about the free hyper-v server not windows server 2012).
      2. Can you run replication both ways, eg:
      Server A runs VMs 1, 2 and 3
      Server B runs VMs 4, 5 and 6
      Can both servers been configured as replicates so Server B runs replicates of Server A and vice versa? ie both servers are used for production and replicate workloads.

      Cheers,
      Shannon

        1. Hi Aidan,

          Based on Shannon scenario, how does Server A and Server B perform replication vice versa. At any one time, there can only be a replica host and client hence in this scenario only 2 server is involve.

          How can vice versa replication via hyper V, appreciate if you can elaborate on the configuration on the hyper-V.

          Nicholas.

    7. Do Hyper-V replicas require VOSE licenses when they are A: not running or B: in the event of a failure and them being powered on until they can fail back to the main site?

      If licenses are required in either situation and we ignore this and instead elect to use the VL 90 day mobility right instead does that mean we need to keep the DR replica running for 90 days before we can fail back to the main site?

      1. A replica Windows Server VM, on or off, requires licensing no matter what replication/virtualization you use. Note that Software Assurance includes a benefit for offline offsite replica copies. Also, if your replica hosts are licensed with Std or Datacenter, then you can use their virtualisation rights, just as you -should- be doing in the production site.

    8. If I’m doing cross site replication with certificates, precisely which port(s) at which sites need to be opened on the gateway firewalls? Is it just port 443 at the Replica site?

      Currently I have 443 and ping open at the Replica site and Replication enabled, but when I try to configure replication from the Primary site using the DNS name for Replica server, I get the message “could not get configuration details of the specified server”. If I go all the way to the end of the wizard, I get the error “the connection with the server was terminated abnormally”.

      My Google-Fu seems to be failing me on this issues, so any help would be greatly appreciated.

    9. How would it be 10 minutes? If the HRL replicates every 5 minutes, wouldn’t the most data you’d lose out on be 5 minutes? I don’t think you’re wrong, I just don’t understand the logic and would like to.
      Thanks so much.

    10. Excellent well written article, ands excellent video. Think it won’t be long before I bin XenServer and move to hyper-v.

    11. You say replica isn’t for medium/enterprise or dozens of servers, and SAN based replication ought to be used for that What advantages does say Netapp asynchronous snapmirror have over replica for DR? Or, conversely, why doesn’t replica scale up? (or how far does it scale up?)

      Or are you saying that it’s not as good as a properly expensive synchronous SAN replica, and if we’ve not got one of those we may as well use Hyper-V replica?

      (genuinely confused here – I’m used to VMware on Netapp with snapmirror, but have no idea how Hyper-V replica compares in real life)

      1. Hyper-V Replica scales out, and how much depends on resource consumption. There is always a resource utilisation price to pay for using software. And this price depends on how much replication you’re doing and how you configure it. Have a read of https://aidanfinn2.wpcomstaging.com/?p=13022. Being software, it is very customisable, and it is hardware agnostic.

        SAN based replication has the advantage of set it once, and “forget” it. That’s great for a self-service cloud where everything on a LUN (a tier of storage in VMM) gets replicated or not. But this has issues too: not every business is equipped skills-wise to look after this setup after the consultants leave. If synchronous, it requires massive bandwidth at very low latency (short distance). Major problem I have with it: hardware vendor and model lock-in.

        It’s a tradeoff, and there is no one right answer. It’s a “it depends”.

    12. Thanks for the detailed article on Hyper-V 2012 replication feature. Couple of questions:

      1- Can replications be done from one Primary host to 2 replica hosts (one in-house and one off-site) maybe using Power Shell? I don’t see that option in GUI.

      2- In case of DR and failover to replica VM, how do you update the source VM after some data changes on the replica VM? I tried reverse replication and that didn’t work. Maybe I didn’t do it right.

      Thanks.

      1. 1) No
        2) You probably forgot to enable inbound replication and configure firewalls for reverse replication to the primary site host(s).

    13. Been looking everywhere for some help on this, so I thought I would post here. II have just installed and configured a HyperV 2012 standalone server, configured in a workgroup. I am managing it from a Win7 workstation with HyperV tools. When I go to the HyperV Settings menu for the server there is no option for Replication Configuration. Any ideas? Am I just completely blind to an obvious configuration problem? I had to jump through some real hoops to get authorization working outside of a domain, but it all seems to be working OK (I have a test server up and running under HyperV).

      Any help would be appreciated – I have spent an entire day trying to think of new and creative ways to google No Replication Configuration, and must have read 100 articles not even remotely related.

      1. You’re managing it from a down level console. Either use RSAT for Windows 8 (on Windows 8) or configure HVR directly on the machine.

        1. Thank you that just saved me most likely another entire night of fruitless searching. I really wish MS would publish some coherent documentation on testing in this fashion. I have been using ESX/i for years now (with dozens of implementations), and I would really like to give this a fair shake.

    14. Hi Aidan,

      i appreciate your blog post, i have one query that if i have a guest machine with 4 TB data on Hyper V 2012 so does it replicate on my DR server, is there any “identical configuration” exists for Primary & DR site/does both machines need a public Ip.

    15. I’m really curious where this leaves Veeam and similar vendors. One of the best things about Veeam is the near-CDP both for ESX and Hyper-V, now I believe EX5.1 includes this, so they are competing with VMware. And as you say here, Hyper-V 2012 has it too. Is there still a compelling case to buy their stuff? How much “value” does this cost them?

    16. How do you direct Hyper-V to replicate its replicas over a specific set of NICs. For example, in the dual server scenario I am attempting to setup I will use 5NICs.
      * One NIC will be for management of the HOST servers.
      * Two NICs will be teamed and setup for use by the Virtual Servers. (These machines will only host 4 or 5 VMs for now)
      * I would like to use One NIC for replica traffic.
      * The last NIC will be used for backups.
      How do you specify which NICs are to be used for replicas? If you setup Storage Migration will it use the IP specified there?

        1. Hi Aidan

          so no way to control this? Even if we have another routable nwk between Source and Replica H-V hosts? We dont want it going over Mgt OS nwk

          tks
          pd

          1. Padraig,
            I can’t see the point in creating an additional NIC for Hyper-V Replica if it’s on the same network and has the same routes as the ManagementOS NICs.
            If your concern is bandwidth control, then use QoS.

    17. This works great in my test lab so far. The only thing I have run into is that I could not do a live migration to a server that was also a replica server for the guest vm.

      Do you know if this is possible?

      Thanks for the article.

    18. ” So the excellent suggestion from the Hyper-V product group is to place the paging file of each VM onto a different VHD, e.g. a SCSI attached D drive. Do not select this drive for replication.” Excellent tip thanks

    19. Hi Aidan, if a VM becomes unavailable at a pri site and I need to make the replica VM available, and I don;t want to use Server 2012 Network Virtualisation, what are my options to get clients talking to the replica VM?

      Is the only way to manually change the DNS record for the server and get clients to flush their DNS cache (or reboot)?

      I’m evaluating using Hyper-V Replica for a bunch of remote sites which replicate back to a remote site DR cluster in our HQ.

      Cheers

      1. If you don’t DNS change, and don’t want to use NV, then you have to stretch your VLANs … and all the networking mess that goes with that.

    20. Hey,

      I like this blog very much and appreciate all your efforts you guys put into.

      We are about to host a couple of Hyper V hosts in our new data center and I am thinking about a scenario which uses shared-nothing live migration between two hosts in site A and a replication from site A to site B.

      Does anybody know if such a scenario is possible? Basically to combine a local live migration in data center A and replicate the “live migrated” virtual machine to another data center / site B?

      Thanks for an answer. A quick “YES” or “NO” would be much appreciated.

      Best regards from Germany,
      Lars

    21. Hi ,

      Thank you for your post

      I have problem with reverse replication
      “Hyper-V failed to enable reverse replication”
      “Hyper-V cannot connect to the Replica “

      1. Make sure that the production site is enabled for inbound replication – Hyper-V settings, authentication, Windows Firewall, Physical Firewall, and end-end communications.

    22. Hi Aidan,

      thank you for clearing up some things for me conceirning HVR, but I just wanted to ask you about something I read in your post on Mary Jo..

      You claim that Privat cloud providers could make use of this feature but in the next column you advise against this because of the Asynchronous rep… Say you can afford a 10 minute loss of data and you have a proper upload on a dedicated WAN Link… would you still advise against using HVR for larger environments…?

      Wkr

      There are a few scenarios where HVR will be used. The SME will find HVR very appealing because it is free and can avail of low cost bandwidth. Those SMEs with two offices might choose to configure each one as the DR site for the other. Managed services partners or public cloud companies can choose to offer hosted DR services, availing of the optional HTTPS authentication and policy mechanisms in HVR, and building on additional add-ons such as remote access and remote backup. Corporations can also look at HVR as a way to provide economic DR replication either to a local DR site or to a central data center.

      HVR is asynchronous replication. Therefore it won’t be suitable for those organizations that need zero data loss. HVR is also not intended for replicating from massive environments such as a public cloud. In this case, users can expect to find high end storage with built-in replication and plentiful low latency bandwidth that can replicate at the hardware level, which is more suitable for large amounts of data and constant VM change.

    23. Aidan,

      Does the Primary (Live) and Secondary (Backup) server need to be in a Domain? I would not want to join and make a domain service as these are all standalone hosts. Also you think it will be safe opening up on SSL? Authetnication hacks?

    24. Since the replication is based on VSS copies of vhd’s, is it correct to assume that a replica has a non-negligeable chance of being in a non-consistent state? (You don’t replicate database-servers (AD, Exchange, SQL, …) by merely replicating their on-disk states)
      Or am I seriously underestimating VSS?

      1. Hyper-V Replica does not use VSS for replication. It logs changes VHD blocks, and replicates compressed last modifications only. VSS is used only for creating historical copies – if you choose to use it. As for application support – check with the applications.

        1. Reading the “Understand and Troubleshoot Guide Hyper-V Replica” document the following question still remains: If I want a replica that has an application constistent state (does anything else even make sense?) I’ll have to use VSS based “Recovery History”. When using a clustered solution (CSV) this will cause my nodes to go into “redirected I/O mode” (which has severe impact on performance), or am I mistaking there?

          1. a) There is no VSS caused redirected mode.
            b) The VSS in Hyper-V is used -only- when maintaining historical copies.

          1. The article is incorrect and I have contacted MSFT. WS2012 uses a new VSS process for CSV. A CSV writer on the VSS requestor (the active backup agent) coordinates with the CSV writers on the other nodes in the same cluster to put the VMs into a quiescent state so that a -single- VSS snapshot is taken for the entire CSV. In W2008 R2, each node running a VM pretty much took it’s turn at running a VSS snapshot, and that required all other nodes to be in redirected IO … and that’s what led to serialized backups when using the VSS system provider.

            The process in the article you linked is not used to get a VSS snapshot in WS2012. There is -no- redirected IO for CSV backup in WS2012.

    25. Nice write up. Note that hyperv guests do not support page files on scsi attached virtual disks – you will have to use IDE

    26. Excellent article. Can you confirm if linux guest VMs are supported for replication? and can linux VMs hosting Oracle databases be replicated?

      1. Yes. As for the workload – check with the application vendor. Oracle, btw, does not support -any- virtualisation that is not made by Oracle. And that applies equally to Xen, vSphere, and Hyper-V.

    27. Can you please explain in details- If I want to replicate Hyper-V VM which is having Exchange or SQL or any other application to DR site. Production and DR are in different network subnets. What all things i have to perform before starting the DR VM and whats all things should be configured for networt and VM will be having IP of production site.

      1. (a) don’t assume that the app in your guest OS will support Hyper-V Replica
        (b) that’s a big subject, and there’s a book coming out soon that explains it all ….

    28. Thanks for the awesome blog!
      Quick Question… We are a nonprofit and currently have a 2012 Hyper-v 2 node cluster attached via iSCSI to a NAS. I am considering the use of replica on the LAN to another identical NAS attached to an underpowered (will be unable to run all replicated VM’s) hyper-v server. This would be DR solely for the NAS. In a scenario where the primary NAS dies, I would physically disconnect the replica NAS, connect the Cluster, reconfigure the storage, and bring the VM’s online. While I understand this would cause down time and possible data lose, it would allow me to replicate my current NAS (no built in replication tech) for DR. Correct? Thoughts?

      1. You’ve misunderstood replication. Hyper-V Replica replicates the virtual machines and their files to the DR site. No need to move NAS/SAN.

    29. is there any MVT or other Pro who can clearly explain WHAT VMs are eglible to be replicaed ? We do not need to repliace to DR host some fileservers etc.. crucial are Exchange server(s) od domain controller, odr for instanace allinone SBS 2008 server..

      A cannot find any approoved info that i can replicate SBS ftom host1 ho host2 without problems in future..

    30. Aidan, with Hyper-V in Server 2012 R2, have the rules changed in regards to running Hyper-V replica instead of a cluster? Do you now consider this a viable solution? or still just for DR?

    31. What are the security implications of HVR over HTTPS? For example, if I accept a replica of a VM from an “untrusted” site (not completely untrusted of course – but a site I don’t have complete control over), which is in a different domain, I can do this with HTTPS. My question is – is this a massive security risk? If the only port they can access on my server on is HTTPS and only they have access to that port (over an MPLS connection), and the correct certificates are in place, what happens if someone else gets on their server – would they in turn get access to my Hyper-V, other than that one individual VM? (I can confirm they don’t have RPC access and they cannot connect to my Hyper-v server using Hyper-V Manager but replication does work).

    32. Thanks Aidan. Very useful article. Can we create a replica of VMs which are in failover cluster with shared iSCSI storage attached from inside the guest OS (Clustered Guest VMs on Hyper-V). the Shared LUN will be replicated using SAN Replication method separately. is it supported by Microsoft. I understand that I would have to do additional steps after failover to bring up the cluster group with in VM like mount the replicated SAN disk, add additional IP address to cluster group etc. Will these configuration supported by MS?

    33. Thanks for the Great article Aidan. I see that you have covered this item in detailed in your 2012 Hyper-V book.

      1. Did MS made further improvements on Hyper-V replica in 2012 R2(apart from extended Replica).

      2. are you planning to write a book on 2012 R2 Hyper-V & SC VMM

    34. Thanks for all the great advise. I’m setting up a replica with one domain controller and a terminal server. The two sites are connected via VPN, but the IP scheme at the remote site is different than the main site. How would IP injection work with this scenario? Should the IP injection relate to the main site IP scheme or the remote site? Clients would need to connect to the terminal server during a disaster.

    35. I have two hyper-v 2012 R2 domain-joined hosts, running in a small business server 2008 domain. I can successfully enable replication from A across an MPLS WAN to B, but only using Kerberos. I appear able to configure the replica server correctly, but when I click Finish on the Primary, it reports that “Enabling Replication failed” because “a connection cannot be established.” Firewalls are disabled on the devices and the LANS. I’ve spent many hours researching and redoing the certs (using makecert), with no success. The cert chains all appear fine – valid trusted roots, trusted by both sides, with valid personal certs (computer) that show up in the hyper-v consoles.
      Any tips on where to go from here? Any benefit to getting a commercial wildcard or SAN cert rather than rolling my own?

    36. Ah, so… I learn more…

      When I enable replication via Kerberos netstat -apo shows port 80 olistening. However, when the cert is selected, netstat -apo does NOT show port 443 listening.

      I’ll add that the cert, when selected, sometimes appears to have not worked and the console hangs for a bit. When replication is reopened, the cert appears selected and can be looked at and closed normally. BUT… not well enough to get the service listening?

      And…?

    37. Hi Aidan,

      Great blog, I have bookmarked this for enlightening knowledge for the future,
      I have a question

      I am currently trying to create replicas to a so “DR” Site, however, due to low bandwidth, I want to do an Initial Copy and transport it over using a External HDD

      now the real question is,

      Could I simply go direct to the VHD/VHDX where the file is stored, take a copy and import it to the DR Site and Enable replication? Or does it need to be done via the Wizard with the “Initial Replica” ?

      Thank You
      Steve

    38. Windows Server 2012 R2 in Domain Cluster to StandAlone Workgroup replica:

      What about if i have a domain with hyper-v cluster with replica broker and a VPN to branch office and standalone Hyper-v server in workgroup ? is the same procedure ?

      I don´t want to make any change over DNS suffix, because the cluster is in production. how can i solve it ?

      Can i create the certificate with an enterprise domain CA Root and then import them together with server certificate ? and then import in each cluster host a self signed certificate from workgroup replica server ?

      Or i need to follow this tutorial anyway ?

      I repeat, i don´t want to make critical changes to the production environment.

      What about if i decide to conserve Branch Office Hyper-V as parto of actual domain without any external Domain Controller in this site ? is right if i think the only issue that maybe will occurs is if i suffer a VPN disconnection or if the server try to find domain and is temporary down, the server will wait 10/15 minutes and then all VM´s will start up and running don´t you ?, and i still have the oportunity (without domain connection to main office) to make an unplanned failover ?

    39. Nice article!!!. I would like to know how clients are redirected to the new IPs that virtual servers replicas will have in case of failure in the primary site. I keep thinking and thinking and do not see it

    Leave a Reply to Aidan Finn Cancel reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.