I’ve noticed that I’ve received quite a few calls over the past year from clients asking me about how to properly use the dr-ip-customizer.exe executable on an SRM server to export an example CSV file, edit the file and re-import into their SRM environment to customize the IP addresses for the Protected Site and Recovery Site. I personally don’t work with SRM that much and tend to forget the details so this post will serve as something I can reference to in the future.
First off, the following is a blog post that goes through the steps for the export and import of a CSV file that can be used to customize your SRM protected servers:
http://blogs.vmware.com/vsphere/2011/08/buil-ip-customization-in-srm-5.html
The most common call I get when people use this VMware blog post is that they receive the following error when trying to generate an example.csv file for them to edit:
C:\Program Files\VMware\VMware vCenter Site Recovery Manager\bin>dr-ip-customizer.exe -cfg ..\config\vmware-dr.xml -o c:\example.csv -cmd generate -vc someVC.domain.com
Input argument error: unknown option -c
Usage:
-h [ --help ] Display usage info.
--cfg arg Path to application XML configuration file.
--cmd arg Command to execute:
apply: Applies the network customization
settings from the input CSV file to the
recovery plans on the SRM servers.
generate: Generates a basic CSV file for the
all virtual machines in the recovery
plans on the SRM servers.
drop: Removes vm recovery settings from VMs
specified by the input CSV file.
--csv arg Path to the CSV file. Read as input for the
"apply" and "drop" commands.
-o [ --out ] arg Output CSV file to use for the "generate"
command. Will overwrite any existing contents.
--vc arg VMware vCenter Server hostname. Can instead be
specified in the application configuration file
at "/Config/VCSERVER". For "apply" and "drop"
commands, use the same server that was used to
generate the input CSV. The VM Ids are different
at each site.
-i [ --ignore-thumbprint ] Ignore the server thumbprint confirmation prompt.
-e [ --extra-dns-columns ] Must be specified if the input CSV file contains
extra columns for DNS information.
-v [ --verbose ] Enable verbose output.
C:\Program Files\VMware\VMware vCenter Site Recovery Manager\bin>
I’m not exactly why but I think the editor of used in the blog post could have automatically changed the “--“ to “—“:
The correct syntax for syntax is actually with two dashes / hyphens:
dr-ip-customizer.exe --cfg ..\config\vmware-dr.xml -o c:\example.csv --cmd generate --vc someVC.domain.com
A sample example.csv file will be generated that looks like this:
What I find with this example.csv file are the following:
1. Still needs quite a bit of manual work (creating lines)
2. It’s too bad this does not export settings you’ve configured from the GUI
With this example spreadsheet, you’ll need to duplicate the row for the Protected and Recovery site vCenter, change the Adapter ID to 1 and then configure your NIC configuration settings as shown below:
Once you’ve completed editing the spreadsheet, proceed to import it with the following command:
dr-ip-customizer.exe --cfg ..\config\vmware-dr.xml --csv c:\example.csv --cmd apply --vc someVC.someDomain.com