Prepare network mapping for Hyper-V VM disaster recovery to Azure

This article helps you understand and prepare for network mapping when you replicate Hyper-V VMs in System Center Virtual Machine Manager (VMM) clouds to Azure, or to a secondary site, by using the Azure Site Recovery service.

Prepare network mapping for replication to Azure

When you replicate to Azure, network mapping maps between VM networks on a source VMM server, and target Azure virtual networks. Mapping does the following:

  • Network connection—Ensures that replicated Azure VMs are connected to the mapped network. All machines that fail over on the same network can connect to each other, even if they failed over in different recovery plans.
  • Network gateway—If you set up a network gateway on the target Azure network, VMs can connect to other on-premises virtual machines.

Network mapping works as follows:

  • You map a source VMM VM network to an Azure virtual network.
  • After failover, Azure VMs in the source network connect to the mapped target virtual network.
  • New VMs added to the source VM network connect to the mapped Azure network when replication occurs.
  • If the target network has multiple subnets, and one of those subnets has the same name as the subnet on which the source virtual machine is located, the replica virtual machine connects to that target subnet after failover.
  • If there’s no target subnet with a matching name, the virtual machine connects to the first subnet in the network.

Example

Here's an example to illustrate this mechanism. Take an organization with two locations in Beijing and Shanghai.

Location VMM server VM networks Mapped to
Beijing VMM-Beijing VMNetwork1-Beijing Mapped to VMNetwork1-Shanghai
VMNetwork2-Beijing Not mapped
Shanghai VMM-Shanghai VMNetwork1-Shanghai Mapped to VMNetwork1-Beijing
VMNetwork2-Shanghai Not mapped

In this example:

  • When you create a replica VM for any VM that's connected to VMNetwork1-Beijing, the replica connects to VMNetwork1-Shanghai.
  • When you create a replica VM for VMNetwork2-Beijing or VMNetwork2-Shanghai, the replica doesn't connect to any network.

Here's how VMM clouds are set up in the example organization, and the logical networks associated with the clouds.

Cloud protection settings

Protected cloud Protecting cloud Logical network (Beijing)
GoldCloud1 GoldCloud2
SilverCloud1 SilverCloud2
GoldCloud2

NA

LogicalNetwork1-Beijing

LogicalNetwork1-Shanghai

SilverCloud2

NA

LogicalNetwork1-Beijing

LogicalNetwork1-Shanghai

Logical and VM network settings

Location Logical network Associated VM network
Beijing LogicalNetwork1-Beijing VMNetwork1-Beijing
Shanghai LogicalNetwork1-Shanghai VMNetwork1-Shanghai
LogicalNetwork2Shanghai VMNetwork2-Shanghai

Target network settings

Based on these settings, when you select the target VM network, the following table shows the choices that are available.

Select Protected cloud Protecting cloud Target network available
VMNetwork1-Shanghai SilverCloud1 SilverCloud2 Available
GoldCloud1 GoldCloud2 Available
VMNetwork2-Shanghai SilverCloud1 SilverCloud2 Not available
GoldCloud1 GoldCloud2 Available

If the target network has multiple subnets and one of those subnets has the same name as the subnet on which the source virtual machine is located, the replica virtual machine connects to that target subnet after failover. If there's no target subnet with a matching name, the virtual machine connects to the first subnet in the network.

Failback behavior

To understand what happens during failback (reverse replication), assume that VMNetwork1-Beijing maps to VMNetwork1-Shanghai, with the following settings.

VM Connected to VM network
VM1 VMNetwork1-Network
VM2 (replica of VM1) VMNetwork1-Shanghai

With these settings, review what happens in a couple of possible scenarios.

Scenario Outcome
No change in the network properties of VM-2 after failover. VM-1 stays connected to the source network.
Network properties of VM-2 are changed after failover and is disconnected. VM-1 is disconnected.
Network properties of VM-2 change after failover and connect to VMNetwork2-Shanghai. If VMNetwork2-Shanghai isn't mapped, VM-1 will be disconnected.
Network mapping of VMNetwork1-Shanghai changes. VM-1 connects to the network now mapped to VMNetwork1-Shanghai.

Next steps

  • Learn about IP addressing after failover to a secondary VMM site.
  • Learn about IP addressing after failover to Azure.