Site Recovery Manager

Automating DR Recovery Site VM Network and IP Configuration with VMware SRM 8.1

Automating DR Recovery Site VM Network and IP Configuration with VMware SRM 8.1 looks at how SRM allows automating network configuration in a site failover

One of the many challenges with entire site recovery in times of disaster recovery is being able to provision network settings appropriately for the DR location. Whatever mechanism being used to replicate virtual machines will by default be carrying an exact copy of the virtual machine including the network settings for the primary production site location. Generally, the network at the DR/secondary location is different (different subnet, gateway, DNS, etc) than the production location. VMware’s Site Recovery Manager 8.1 is a powerful product allowing organizations to have a fully featured product allowing automation and orchestration of site recovery mechanisms that allow seamlessly replicating virtual machines across between production and recovery sites and failing over. In this post we will take a look at Automating DR Recovery Site VM Network and IP Configuration with VMware SRM 8.1 and see how SRM 8.1 provides the features and functionality to map networks and change IP configuration on replicated VMs.

Why Is Recovery Site Network Reconfiguration Needed?

We have already touched on this a bit, but why is recovery site network reconfiguration needed?ย  Wouldn’t you simply be able to power on your virtual machines at the recovery site and everything work?ย  Well, to a point you would be able to do that.ย  The virtual machines would certainly boot and be configured the way they were configured in the production site with the same static IPs, etc.ย  However, keep in mind the virtual machine would need all the same network infrastructure in place before it would truly be able to communicate, including the same gateway and DNS server addresses.ย  Generally speaking, most recovery or DR sites are not running the same internal LAN subnet as exists for the production subnet as this would result in overlapping subnets and routing issues.

Granted, there are ways to have overlapping subnets in the same environment, but this involves NAT’ing and other network mechanisms that allow separating the two overlapping subnets and having some sort of intermediary network addresses to route to and from which allows traffic to flow between them.ย  This creates a good deal of complexity.ย  So, while it can be done, in a DR situation you most likely do not want to introduce additional complexity just to have network connectivity.

When thinking about hypervisor hosts such as ESXi, you also can potentially have differentย network labels in existence at both locations so the port group names could be labeled differently between the recovery site and the production location.

Automating DR Recovery Site VM Network and IP Configuration with VMware SRM 8.1

VMware’s Site Recovery Manager includes some really great functionality that helps to account for the network differences that exist in the protected site vs the network configuration that may exist in the recovery site.ย  This allows SRM to reconfigure the recovered virtual machine (replicated virtual machine) with the corresponding network settings that are appropriate for the recovery site.

It does this by way of theย Network Mappings settings.ย  In Network Mappings, you can map port groups between your ESXi environment in the protected site with the corresponding port group that you want to utilize in the recovery site.ย  This allows the VM to come online in the correct port group.

Additionally, there areย IP Customization rules that allow basically mapping an IP address scheme from your protected site with the corresponding IP address scheme at the recovery site.ย  With the IP customization rule, VMware Site Recovery Manager preserves theย host bits for statically assigned virtual machines and replaces the network bits.ย  So as an example, in my lab environment:

Protected site10.1.149.53/24
would be reconfigured to
Recovery site192.168.1.53/24

In the above the class C address space is changed but host address is preserved.ย  Let’s take a look at how to create the network mapping rules and test network for SRM between the protected and recovery sites.

Create Network Mapping with Site Recovery Manager 8.1

As you can see below, you navigate to theย Network Mappingsย section under theย Configure menu.ย  Once there, under the network mappings section, you can edit mappings already there or click the +New button to add a new mapping.

Creating-or-editing-a-new-network-mapping-VMware-Site-Recovery-Manager-8.1
Creating or editing a new network mapping VMware Site Recovery Manager 8.1

Here I am selecting toย Prepare mappings manually.ย  You can have the wizard automatically prepare the mappings by mapping the matching names together at each site.

Choose-network-mapping-creation-mode
Choose network mapping creation mode

Expand the available networks under each site andย Add Mappings.

Choosing-the-recovery-networks-in-network-mappings-wizard
Choosing the recovery networks in network mappings wizard

Here I am simply selecting theย VM Network label at each site then clicking the Add Mappings button.

Adding-the-chosen-recovery-networks-in-the-network-mappings-wizard-in-SRM-8.1
Adding the chosen recovery networks in the network mappings wizard in SRM 8.1

Network mapping has been added.

Recovery-network-mapping-is-added-in-the-new-network-mapping-wizard
Recovery network mapping is added in the new network mapping wizard

You can select toย reverse the mapping as well for your reverse replication.ย  Select the reverse order listed and click Next.

Choosing-to-add-the-reverse-mapping-in-the-network-mapping-configuration
Choosing to add the reverse mapping in the network mapping configuration

Theย Test Network are used instead of the recovery networks while running tests of the recovery plan.ย  The isolated networks are automatically created and used during the tests for all networks.

Configuring-the-test-network-for-testing-the-recovery-plans
Configuring the test network for testing the recovery plans

The wizard is ready to complete the new network mappings wizard.

Ready-to-complete-the-new-network-mappings-wizard
Ready to complete the new network mappings wizard

Creating a New IP Customization Rule in SRM 8.1

So, we have handled the customization of the network mapping.ย  Now, the IP address still has to be configured.ย  For that, Site Recovery Manager allows creatingย IP Customizationย rules that allow customizing the IP address of the recovered virtual machine automatically.

Adding-an-IP-Customization-Rule-in-Site-Recovery-Manager-8.1
Adding an IP Customization Rule in Site Recovery Manager 8.1

Theย Add IP Customization box pops up, allowing us to configure the source IP range at the protected site and then defining the resulting IP subnet range at the recovery site.ย  Site Recovery Manager will look at the IP address of statically assigned virtual machines in the recovery site and see if they match the source range.ย  If they do, it will then look at the target subnet that needs to be configured and replace the network bits with the configured network range of the resulting subnet at the recovery site.ย  You also have the ability to configure the gateway, DNS suffixes, Primary WINS server and Secondary WINS server.

Creating-a-new-IP-customization-rule-in-Site-Recovery-Manager-8.1
Creating a new IP customization rule in Site Recovery Manager 8.1

We now have both the network mappings and IP customization configured for our Site Recovery Manager Recovery plans to operate both in test mode and production failover.

Automating-DR-Recovery-Site-VM-Network-Configuration-with-VMware-SRM-8.1
Automating DR Recovery Site VM Network and IP Configuration with VMware SRM 8.1

Takeaways

All too often, we think very in depth about the actual data protection (which is critical and extremely important).ย  But we fail to think about connectivity to that data after it is restored.ย  It is critically important to think through how connectivity is restored back to virtual machines that have been recovery possibly in a different site altogether and how those virtual machines are going to be brought back up on the network.ย  if you have one or a handful of virtual machines, you may get away with doing this manually.ย  However, if you are talking about tens or hundreds of VMs, you need to have an automated way to do this.ย ย Automating DR Recovery Site VM Network and IP Configuration with VMware SRM 8.1 makes the process extremely easy by defining mapped networks and creating IP customization rules that can take care of the heavy lifting involved with assigning the network port group at the recovery site as well as handle the re-IP’ing of the virtual machines so they can access the network i a totally different IP subnet.

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a 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.