A few months ago, a reader by the name of Tolga ŞENTEKİN came across This Post looking for something to do a little more. Tolga was looking to script out DR for some VMs he has that use NetApp with & without RDMs. He & I spent about three weeks putting a script together to do the following:
- Breaks snapmirror replication
- Creates flexclones of the replicated volumes (given you’re licensed for it)
- Map them to the esx hosts on the disaster recovery site
- Adds and resignatures the LUNs and adds the VMs inside them to the inventory
- After that, if you have RDM LUNs attached to the VMs, you first remove the old RDM Mappings from the VM and add the actual LUNs in the disaster site with the same LunID’s
- If it’s all done you can start the Vm’s in the disaster site.
Tolga wrote the vast majority of the script, with me only contributing some of the datastore, LUN, & iSCSI stuff.
I uploaded it and have provided a link, since I didn’t want it to get sauteed up from a C&P.
Click HERE to download a copy of the script (right-click, save-as). Obviously, you will need to edit & fine tune for your environment, but he & I wanted to share with the community.
That was a great collaboration we did I’d like to thank again and my beer offer is still valid:)
Best
Tolga