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 and XmlToCsv to rescue:
Most versions of SRM ship with a handy tool called drIpreporter. 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 using drIpreporter . This csv file can be used with dripcustomizer 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 ID | VM Name | vCenter Server |
vm-2002 | win2k_clone | Site-1 |
vm-2002 | win2k_clone | Site-1 |
vm-2002 | win2k_clone | Site-2 |
vm-2002 | win2k_clone | Site-2 |
vm-2002 | win2k_clone | Site-2 |
vm-2002 | win2k_clone | Site-2 |
The script expects two inputs:
- Absolute path for an input file
- This is the XML file generated using drIpReporter
- Absolute path for an output file
How to use:
- Install Python3
- Install git
- Clone the repo using
git clone https://github.com/akshaykalia-chd/XmlToCsv.git
- Execute
pip3 install -r ./requirements.txt
- Execute main.py