Resurrect SRM Protection Groups

Posted by

Use case:

Some operational error or an environmental change has left all your protection Groups in an error state.

All the VMs under the protection Groups have IP customizations defined using the vSphere UI. Therefore, a CSV file for dripcustomizer is not available.

drIpReporter andXmlToCsv to rescue:

Most versions of SRM ship with a handy tool calleddrIpreporter. This tool can generate a XML file for all your protection group settings including IP customization specifications.

While most other configurations are quite straight forward to recreate IP customization can be a operational nightmare

XmlToCsv can help you to create a CSV file from the output XML generated usingdrIpreporter . This csv file can be used withdripcustomizer after little modification.

Feel free to check the code at https://github.com/akshaykalia-chd/XmlToCsv

Modifications needed to csv file:

  • VM ID: This filed need to be updated with the ID reported by dripcustomizer for the VM
  • vCenter Server: This filed need to be updated with the FQDN of the vCenter corresponding to the Site listed

Section of the csv file generated :

VM IDVM NamevCenter Server
vm-2002win2k_cloneSite-1
vm-2002win2k_cloneSite-1
vm-2002win2k_cloneSite-2
vm-2002win2k_cloneSite-2
vm-2002win2k_cloneSite-2
vm-2002win2k_cloneSite-2

The script expects two inputs:

  1. Absolute path for an input file
    1. This is the XML file generated using drIpReporter
  2. Absolute path for an output file

How to use:

  1. Install Python3
  2. Install git
  3. Clone the repo using
    1. git clone https://github.com/akshaykalia-chd/XmlToCsv.git
  4. Execute
    1. pip3 install -r ./requirements.txt
  5. Execute main.py

Leave a Reply

Your email address will not be published. Required fields are marked *