When administrators are planning to deploy a disaster recovery solution, one of the key questions in their mind is that how the virtual machine would be reachable after the failover is completed. Using Network Mapping the administrator can choose which network the virtual machine would be attached to after failover. Read more about Network Mapping here
While designing the network for the recovery site, the administrator has two choices:
1. Use a different IP address range for the network at recovery site: In this scenario the virtual machine after failover will get a new IP address and the administrator would have to do a DNS update. Read more about how to do the DNS update here
2. Use same IP address range for the network at the recovery site: In certain scenarios administrators prefer to retain the IP addresses that they have on the primary site even after the failover. In a normal scenario an administrator would have to update the routes to indicate new location of the IP addresses. But in the scenario where a stretched VLAN is deployed between the primary and the recovery sites, retaining the IP addresses for the virtual machines becomes very attractive. This simplifies the recovery process by taking away any network related post failover steps.
In this blog we would talk about how retaining an IP address is possible after failover using Hyper-V Recovery Manager (HRM). Let us consider various topologies of network.
1. DHCP: In the scenario when virtual machines use DHCP, the management of IP addresses is completely outside the control of HRM. Administrator has to ensure that the DHCP server serving the IP addresses on the recovery site can serve from the same range as that of the primary site.
2. Static IP Address: In case virtual machine is using static IP address, HRM allocates IP addresses to the virtual machines from the Static IP address pool defined for the relevant network in the VMM Server. If the administrator defines the same IP address pool for the network on the recovery site as that of the IP address pool of the network on the primary site, while allocating the IP address to the replica virtual machine HRM would allocate the same IP address as that of the primary virtual machine. This IP address would be set as Failover IP address for the virtual machine. You can view the Failover TCP/IP settings by going to Hyper-v console.
In the scenario when the same IP is not available, HRM would allocate and set as Failover IP address some other available IP address from the defined IP address pool.
Let us look at following screen captures to make things clearer.
Pic1: IP Address settings of Primary Virtual Machine
Pic2: IP Address Pool for Primary Network (on VMM Server)
Pic3: IP Address Pool for Recovery Network (on VMM Server)
Pic4: Failover IP Settings for Replica Virtual Machine (on Hyper-v console)
Single VMM Server managing both sites: If the administrator is using a single VMM to manage both primary and recovery sites, he won’t be able to create duplicate an IP address pool if using network of the type No-Isolation (one connected network without network virtualization). If network of type VLAN or HNV is used, the solution explained above would work even in case of single VMM Server managing both sites. In the scenario when the network is of not type VLAN or HNV, following workaround is possible:
If the goal is to retain the IP address on replica virtual machine in case of No Isolation based network, administrator should not define an IP address pool for the network on recovery site. In this scenario enable protection job would ‘complete with errors’ complaining about absence of an IP address pool. No IP address would be allocated or set as Failover IP address on the replica virtual machine. The error received during the enable protection job can be ignored. Replica virtual machine would still get connected to the Recovery Network. On failover, the virtual machine would retain the IP address which was allocated to the primary virtual machine and hence was set in the IP address settings of the primary virtual machine.
Again, let us look at some screen captures to make things clearer.
Pic5: IP Address setting for Primary Virtual Machine
Pic6: IP Address Pool for Primary Network (on VMM Server)
Pic7: No IP Address Pool in Replica Network (on VMM Server)
Pic8: Replica Virtual Machine connected to Recovery Network (on VMM Server)
Pic9: Failover IP not set for Replica Virtual Machine (on Hyper-V console)
If you have further questions, feel free to post them on the Hyper-V Recovery Manger Forum