SRM 5.8 IP Customization
January 5, 2015Some companies have built out their disaster recovery site with a stretched layer 2 network or even a disjoint layer 2 network that shares the same IP addresses with their production sites. This is great because VMs don’t need to change IP Addresses if there is a failover event. This post goes over what options we have if you need to change IP Addresses during your failover.
Network mappings
SRM 5.8 has a wonderful new way to manage IP Addresses between datacenters. Prior to SRM 5.8 each VM needed to be manually updated with a new IP Address or done in bulk with a CSV template (show later in this post) if you had to re-IP your VMs. Now with SRM 5.8 we can do a network mapping to make our lives much easier. This is one of the best new features of SRM 5.8 in my opinion.
Go to your sites in “Site Recovery” and click the Manage tab. Here, you’ll see our network mappings again. Click the networks that you’ve mapped previously and then you can click the “Add…” button to create some IP Customization Rules.
When the “Add IP Customization Rule” screen comes up, you can see that we can now map the networks to one another and the virtual machine will keep the host bits the same between networks. For example, if you have a VM on the 10.10.50.0/24 network with an IP Address of 10.10.50.100, and it needs to failover to the 10.10.70.0/24 network, it will keep it’s hosts bits the same, and just change the network, making it 10.10.70.100 at the DR site. SIMPLE!!!!
Obviously, there are a few other things that you’ll need to modify such as DNS Servers, suffixes and of course the default gateway.
Once you’ve created your IP Customization Rules, you can see them listed below the network mappings for your virtual machines.
Manual IP Customization
If the subnet mapping spelled out above doesn’t work, you can manually customize an IP Address of each VM. Go into your recovery plans and find the virtual machine to customize. Right click and choose “Configure Recovery…”
Click the IP Customization Tab. Here you’ll see that you can add IP Addresses for both sites. Be sure to enter IP information in for both sites. If you failover to the recovery site and didn’t set the protected site IP Addresses, you’ll have some IP issues when you try to fail back.
Click either the “Configure Protection…” or “Configure Recovery…” and then you can enter your IP information. Again, be sure to do both sites.
BULK IP Customizer
Many times it’s not practical to modify the IP addresses of every individual VM as they are configured. Luckily VMware has provided a way to bulk upload IP addresses.
From an SRM server, open a command prompt and change the working directory to: c:Program FilesVMwareVMware vCenter Site Recovery Managerbin
NOTE: Path may be different depending on your install location.
Generate a .CSV file to edit your IP Addresses by running dr-ip-customizer.exe with the –cfg, –cmd –vc -i –out switches.
–cfg should be the location of the vmware-dr.xml file. –cmd should be “Generate”, –vc lists the vCenter server, and –out lists the location to generate the .csv file.
Example: dr-ip-customizer.exe –cfg “C:Program filesVMwareVMware vCenter Site Recovery ManagerConfigvmware-dr.xml” –cmd generate –vc FQDNofvCenter -i –out c:ipaddys.csv
Open the .csv file and fill out the information. Notice that there are two entries for the VM. This is because there are two vCenters and in order to do protection and fail back we need the IP Addresses for both sides.
Once the IP Address information is entered, run the customizer again with the –cmd “Apply” and –CSV file location.
Example: dr-ip-customizer.exe –cfg “C:Program filesVMwareVMware vCenter Site Recovery ManagerConfigvmware-dr.xml” –cmd apply –vc FQDNofvCenter -i –csv c:ipaddys.csv
Hi,
It’s a great post. I had IP customization rule working with vSphere Standard Switch. However, with vSphere Distributed Switch, IP customization rule didn’t work (it was skipped when running recovery plan). Does VMware support ip customization rule for vSphere Distributed Switch? or am I missing anything in the configuration?
IP Customization scripts will work with both distributed and standard switches. Re-check your customization rules.
Thanks Eric. I re-checked the ip customization rules and it’s working now.
Hi Eric,
Can we assign the same IP subnet for SR site while doing network mapping?
Thanks,
Umesh
If you mean the same IP Address from the Protected site, in the recovery site then yes.
Hi Eric,
building out our DR site and noticed that I cannot get a jump start on completing the ip customizer until my sites are paired. I’m ok with that as I only have around 30 vm’s, but wanted to know what you recommend regarding getting updated DNS entries to other DC’s I have around the globe? Script, push with sites and services, forced replication?
Thank you,
Derek
The classic answer of, “It all depends”.
If you’re lucky enough to have a stretched layer 2 across sites, then no DNS changes are necessary since the IPs shouldn’t change.
Otherwise, I’ve scripted it in the past.
Its also possible to have the same IP space in both sites so you’re failover will work and the vms keep the same IPs. But be careful here, this is like intentionally doing a split brain for the network. Again, it depends on your requirements and constraints.
Thanks Eric,
I read about that, but won’t be able to do stretch layer 2.
From what I understand from the VMware srm hands on lab and other readings, setting the recovery site IP’s of each protected vm will register in DNS on the DC in the recovery site once they boot up. This is good, as they would at least get the new ip to host name stamped in there and replicate to the other DC’s around the globe in time. in this situation it seems to me that the fastest way to replicate the changed DNS entries would be using sites and services to push these updates from the updated DC in the recovery site.
Hello, is there a way to customize a NIC with multiples IPs?
for example in linux I have eth0 and eth0:0. I did a test and the default customization erase my eth0:0 configuration when I ran a test recovery.
I know this is possible in the ip-customizer and thought that it was available through the gui as well but can’t confirm that. It is possible, but worst case you need to use the ipcustomizer to do it.
During Testing, If same Network used for Testing is the Recovery with IP customization, some of my vms customize , some don’t is this supported ? Network is currently fully isolated and would like to simulate and test before full recover.
As said some test vms re-ip , most don’t
My first instinct would be to ask if you have VMware tools installed and running on all the virtual machines. Anything else specific about those machines that don’t IP? Same OS?
Nothing specific, Happens to both Windows and Redhat, Vmtools on all. one thing can’t be 100% yet is E1000 or VMXnet3 on all. Most appear to have e1000 bit are production and cannot change soon.
Just verified 2 not working exactly same OS , VMXnet3 and VMtools installed … No ips are assigning
I am seeing just skipped against the vms for IP Customize
Hi, I have a VM with multiple vNIC and configured as teaming at OS level (Windows server). recovery done successfully (includes ip customization step) but technically, IP didn’t change at recovery site. so I have to change the IP address manualy at recovery site.
do you have any idea?
I think you’ll need to use a guest customization script as part of the recovery plan. Script out setting the IP Addresses for the team in PowerShell and then call that script as a step in the recovery plan.
Hi Eric, your response is greatly appreciated. I’ll try it in my environment.
Hi Eric
I’ve been trying to run this but without much success
The CSV generates and I see all my VMS but the only columns showing information are VMID, VM Name, vCenter Server, Adapter ID.
The adapter IDs are all 0 and no IP addresses are showing
I can see the protected and recovery IP if I manually go configure recovery on a VM, but I need to be able to export these en masse as we are going to be spinning up a new 8.1 environment soon and will have to reconfigure these VMs.
Thanks