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

This article helps you to 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, using the Azure Site Recovery service.

Prepare network mapping for replication to Azure

When you're replicating 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 which fail over on the same network can connect to each other, even if they failed over in different recovery plans.
  • Network gateway—If a network gateway is set up 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 will be connected to the mapped target virtual network.
  • New VMs added to the source VM network are connected 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 subnet on which the source virtual machine is located, then 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. Let's 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 a replica VM is created for any VM that's connected to VMNetwork1-Beijing, it will be connected to VMNetwork1-Shanghai.
  • When a replica VM is created for VMNetwork2-Beijing or VMNetwork2-Shanghai, it won't be connected to any network.

Here's how VMM clouds are set up in our 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 will be 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, then the replica virtual machine will be connected to that target subnet after failover. If there's no target subnet with a matching name, the virtual machine will be connected to the first subnet in the network.

Failback behavior

To see what happens in the case of failback (reverse replication), let's assume that VMNetwork1-Beijing is mapped to VMNetwork1-Shanghai, with the following settings.

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

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

Scenario Outcome
No change in the network properties of VM-2 after failover. VM-1 remains 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 are changed after failover and is connected to VMNetwork2-Shanghai. If VMNetwork2-Shanghai isn't mapped, VM-1 will be disconnected.
Network mapping of VMNetwork1-Shanghai is changed. VM-1 will be connected 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.