Restoring a 2 TB SQL server from backup means moving the disks back from the backup repository to production storage; this takes hours, and this time often determines the RTO. Replication keeps an up-to-date copy of the machine ready, powered off, at the second site. Recovery stops being a “moving” job and becomes a “powering on” job. Below we cover Hyper-V Replica, Veeam replication and storage-level replication, together with failover, failback, IP management and bandwidth calculation.
Backup and replica aren’t the same thing
A replica doesn’t replace backup. Whatever happens on the source (a deleted table, an encrypted file server) is written to the target within a few minutes too; how far back you can go is limited by the recovery points kept in the replica. Encrypted data is copied to the replica as well. Restoring data from weeks or months ago, and keeping an immutable copy, is the job of backup.
The right question isn’t “backup or replica” but “which systems need a replica.” Systems with an RTO of less than a few hours are protected by replication, the rest by restoring from backup. We explain how to map systems to targets in the choosing technology by RPO/RTO target article; for the number of copies and media diversity, see the 3-2-1-1-0 backup rule article.
How Hyper-V Replica works
Hyper-V Replica is an asynchronous VM replication feature that comes with Windows Server; the feature itself needs no additional license. Check the license coverage of Windows Server virtual machines on the replica server separately (for example, the disaster recovery rights that come with Software Assurance). The primary server collects the VM’s disk writes in a replica log (.hrl) and sends this log to the replica server at the chosen interval. On the replica side, the VM stays powered off and the logs are applied to its disks. Put the conditions for activating replication, the people responsible and the order of return in writing within a disaster recovery plan.
Key parameters
- Replication frequency: 30 seconds, 5 minutes or 15 minutes. This value is the lower bound of the real RPO; if the link can’t keep up, the lag grows and you start seeing warnings in the console.
- Additional recovery points: Hourly points can be kept for up to 24 hours. They are needed to return not to the latest state but to a clean state a few hours earlier.
- Application-consistent snapshots: Taken with VSS at intervals set in hours. The other points are crash-consistent; for workloads such as SQL Server and Exchange, take a VSS point at least every few hours.
- Authentication: Kerberos (HTTP, default port 80) or certificate (HTTPS, default port 443). Certificates are used for a replica server outside the domain or at an untrusted site.
- Extended replication: A second copy chain can be set up from the replica server to a third server.
For VMs on a failover cluster, the Hyper-V Replica Broker role is configured in the cluster; the replica target becomes this client access point rather than a single node. A common mistake here: replication is enabled to a node name without setting up the Broker, and replication breaks when the VM moves to another node.
Setup with PowerShell
# On the replica server: accept replication (Kerberos, HTTP)
Set-VMReplicationServer -ReplicationEnabled $true `
-AllowedAuthenticationType Kerberos `
-ReplicationAllowedFromAnyServer $true `
-DefaultStorageLocation "D:\Hyper-V\Replica"
Enable-NetFirewallRule -DisplayName "Hyper-V Replica HTTP Listener (TCP-In)"
# On the primary server: enable replication for the VM
Enable-VMReplication -VMName "SQL01" `
-ReplicaServerName "hv-dr01.contoso.local" -ReplicaServerPort 80 `
-AuthenticationType Kerberos -ReplicationFrequencySec 300 `
-RecoveryHistory 4 -VSSSnapshotFrequencyHour 2
Start-VMInitialReplication -VMName "SQL01"
# Status and health
Get-VMReplication
Measure-VMReplication -VMName "SQL01"
For large VMs, initial replication can fill the WAN link for days. In that case, export the first copy to an external disk and import it at the DR site, or use a copy already restored on the replica server as the starting point. If the link stays full for days, other services slow down too.
Veeam replication
Veeam Backup & Replication reads the VM through a hypervisor snapshot and writes to a replica VM that stays powered off on the target host. It works for Hyper-V and VMware vSphere; the source and target are the same hypervisor type, while storage types can differ. This is a separate product from Hyper-V Replica, which is Windows Server’s own feature; for Hyper-V virtual machines, Veeam’s replication is snapshot-based. Where it differs from Hyper-V Replica:
- Central orchestration: With a failover plan, VMs are powered on in a set order and with delays; ordering by application group is managed from a single screen.
- Re-IP rules and network mapping: On Windows VMs, the IP address is changed rule-based for the different subnet at the DR site; source and target virtual networks are mapped.
- Replica seeding/mapping: The first copy can be started from an existing backup or from a VM already on the target.
- Replica from backup: The replica can be fed from the backup chain without touching the production VM a second time.
- Continuous data protection (CDP) for vSphere: On VMware vSphere virtual machines, it provides RPO on the order of seconds with an I/O filter; both source and target are vSphere.
Veeam Universal CDP
Universal CDP is a separate feature: it relies on an agent installed on the protected machine, not on the hypervisor. It arrived for Windows machines with Veeam Backup & Replication 13; version 13.1 added physical, virtual or cloud Linux machines. Here, evaluate the source workload and the target platform separately. The Veeam 13.1 documentation lists VMware vSphere, and VMware Cloud Director through Veeam Cloud Connect, as targets. Hyper-V isn’t a target platform for Universal CDP. If your recovery site is Hyper-V, Hyper-V Replica or Veeam’s snapshot-based Hyper-V replication is used.
Because it is snapshot-based, the practical lower limit of scheduled replication is on the order of minutes, and each run creates a short-lived snapshot on the source. On a write-heavy database, committing this snapshot can cause a brief stall; schedule the job accordingly. On VMware, replica recovery points are kept as VM snapshots, so the number of points that can be kept is limited. Proxy and repository placement determines replication performance; details are in the Veeam proxy and repository design article.
Storage replication: synchronous and asynchronous
Storage-level replication copies LUN or volume blocks in the system infrastructure to the array at the other site, independent of the hypervisor. There are two modes:
- Synchronous: No acknowledgment returns to the application until the write completes on both arrays. RPO is zero, but every write gets the inter-site round-trip latency added. That’s why distance and latency are limited; take the allowed RTT value from the vendor’s support matrix, don’t guess.
- Asynchronous: The write completes on the local array, and changes are sent at set intervals or as a continuous stream. There is practically no distance limit; RPO is greater than zero.
Storage Replica in Windows Server offers both modes independent of the array; it can be used in full in the Datacenter edition, and in the Standard edition limited to a single partnership and a single volume of up to 2 TB (Windows Server 2019 and later).
Storage replication has two limits. First, the copy is crash-consistent by default; for application consistency, array snapshots must be coordinated with VSS. Second, only data is copied: VM registrations, network mapping and boot order must be orchestrated separately (in a VMware environment, Site Recovery Manager does this). Corrupted or encrypted blocks also cross over at the same speed. The array can’t tell the difference.
Comparison table
| Criterion | Hyper-V Replica | Veeam replication | Storage replication |
|---|---|---|---|
| Typical RPO | 30 s – 15 min | Minutes (seconds with CDP if the target is vSphere; no CDP for a Hyper-V target) | Zero when synchronous |
| Additional license | None for the feature; the replica server’s Windows Server license is evaluated separately | Veeam license | Array license / Datacenter |
| Recovery points | Up to 24 hours | Depends on job settings | Depends on array snapshots |
| Orchestration | PowerShell, scripts | Failover plan | Needs a separate tool |
| Hypervisor | Hyper-V only | Hyper-V, vSphere | Independent |
In small and mid-sized Hyper-V environments, using Hyper-V Replica together with Veeam backup is a common, low-cost setup. For a few systems needing zero data loss, synchronous storage replication stands out; when many VMs need to be powered on in order, the Veeam failover plan does.
Failover, failback and IP management
Planned failover
Done before maintenance or a foreseen outage; there is no data loss. In Hyper-V Replica the order is:
# On the primary server: the VM is shut down and remaining changes are sent
Stop-VM -Name "SQL01"
Start-VMFailover -VMName "SQL01" -Prepare
# On the replica server: failover, reverse direction and power on
Start-VMFailover -VMName "SQL01"
Set-VMReplication -VMName "SQL01" -Reverse
Start-VM -Name "SQL01"
After -Reverse, the old primary server becomes the new replica target. Failback is the same steps repeated in the opposite direction. Forgetting to reverse the direction and leaving the VM running at the DR site is a common gap: the machine runs, but nobody is protecting it anymore.
Unplanned failover
While the primary site is unreachable, Start-VMFailover is run on the replica server; an earlier recovery point is chosen if needed. After the VM boots and the application is verified, the other recovery points are merged with Complete-VMFailover. Before this command you can go back to another point. After it, you can’t. When the primary site comes back, replication is re-established in the reverse direction and synchronized by comparing changed blocks.
Test failover
Start-VMFailover -AsTest creates a temporary VM named “SQL01 – Test” on the replica server; replication isn’t interrupted. Don’t connect the test VM to the production network; put it on an isolated virtual switch; otherwise two machines with the same name and IP conflict in production. When the test is done, clean up with Stop-VMFailover.
Changing the IP address
If the DR site is on a different subnet, there are two paths: stretch the subnet (VLAN) between the two sites, or change the IP during failover. Hyper-V Replica does IP injection on Windows guests through integration services:
Set-VMNetworkAdapterFailoverConfiguration -VMName "SQL01" `
-IPv4Address 10.20.5.15 -IPv4SubnetMask 255.255.255.0 `
-IPv4DefaultGateway 10.20.5.1 -IPv4PreferredDNSServer 10.20.5.10
The job isn’t done when the IP changes. Lower the TTL values of DNS records in advance, review hard-coded IPs in application configurations and firewall rules, and list software with IP-bound licenses beforehand. On Linux guests and for dependencies on devices with static settings, IP changes are mostly done by script. The item that trips up drills most often is usually an IP address embedded in an application or a DNS record with an old TTL.
Bandwidth calculation
The replication link is sized for the change in the busiest hour, not the average change. Collect a few days of disk write data to measure: Measure-VMReplication output and performance counters on Hyper-V, volume write statistics on the storage array.
Example calculation: Consider a group of VMs producing a total of 18 GB of change in the busiest hour. 18 GB × 8,192 = 147,456 Mbit; divided by 3,600 seconds, that’s about 41 Mbit/s. Add 20–30% headroom for protocol and encryption overhead; compression (on by default in Hyper-V Replica) reduces this need depending on data type. A link that can’t carry the peak value delays replication during busy hours and exceeds the RPO target. If nightly backup jobs also use the same link, calculate both loads together.
Make a separate plan for initial replication and resynchronization (resync). In Hyper-V Replica, if the log backlog exceeds a certain threshold, replication goes into a critical state and a full resync may be required; that means re-reading the entire disk. Don’t let a resync fall during working hours.
Implementation checklist
- The VMs to be protected by replica and their target RPO values are listed.
- Application-consistent point frequency is set separately for database servers.
- Compute, storage and license capacity at the DR site is enough to carry the load after failover.
- The IP strategy (stretched VLAN or IP injection) and DNS TTL values are decided.
- Domain controllers are running at the DR site through AD replication rather than Hyper-V Replica.
- Test failover is done on an isolated network at least every three months, and the result is recorded.
- Replication health is tied into the monitoring system; a notification goes out on a warning.
If Hyper-V cluster design and DR site sizing are handled together, replication brings fewer surprises; on these topics, see our virtualization and data management and backup and disaster recovery service pages. Microsoft’s official setup document: Set up Hyper-V Replica.
Frequently asked questions
What ports and firewall rules does Hyper-V Replica need?
Kerberos authentication uses HTTP 80 by default, and certificate-based authentication uses HTTPS 443; the port numbers can be changed. On the replica server, enable the Hyper-V Replica HTTP or HTTPS Listener (TCP-In) inbound rule depending on the chosen method, and open the same port from the primary servers to the replica servers on the inter-site firewall.
Should a domain controller be protected with Hyper-V Replica?
The path we recommend is to keep an additional, always-running domain controller at the DR site and rely on AD’s own replication. On Windows Server 2012 and later, VM-GenerationID protects the failover of a replicated DC against USN rollback risk; still, use a replica DC not as the main recovery path but in test failover drills on an isolated network.
When is synchronous storage replication needed?
It makes sense in environments where zero data loss is a business requirement, inter-site latency stays within the vendor’s supported limit, and both sites have compatible storage arrays. In other cases, asynchronous replication is enough at lower cost.
When should the Complete-VMFailover command be run?
After the failed-over VM has booted and application verification is complete. This command merges the other recovery points; after running it, you can’t go back to a different recovery point.