We were needing to migrate all of our host and VMs from vCenter 6.5 to vCenter 6.7 and we wanted to move our current replications from old vSphere Replication appliance to the new appliance after the VMs have moved. I started working on set of workflows which can accomplish this task and wanted to share it with the community as I myself struggled getting the resources and documentation online. Hope it helps someone in the same boat.
Current 6.5 environment -
2 vCenters in Site 1
1 vCenter in Site 2 (DR)
400 VMs in Site 1 being replicated to Site 2 (DR)
2 vSphere Replication Appliances (1 for each vCenter in Site 1)
1 vSphere Replication Appliance + 2 Add-Ons in Site 2 (DR)
Created a directory in vRO under /mnt called "cifs-share" with 755 privileges
Versions -
vRealize Orchestrator Appliance 7.3.1
vSphere Replication Appliance 8.2
Source vCenter Server Appliance 6.5 u3 (Before migration)
Destination vCenter Server Appliance 6.7 u3 (After migration)
Here are the workflows included in package and some details of what they do -
- Export Replication Details - This workflow creates a XML file inside vRO appliance which includes details like : VMname, VMid, MpitDetails, RPO, NetworkCompression, Quiescing, Replicated disks, Relication Datastore etc. The workflow gets all current replications and saves this info in the XML file
- Pause Replications - This workflow imports the replication details from the XML file and pauses each one of them.
- Rename Folders - This workflow gets all current replication details from XML and renames the folder names in remote datastore by appending "-old" at the end so that when we "unconfigure/stop/remove" replications, the underlying data still exists and can act as seeds for later.
- Stop Replications - This workflow stops and unconfigures replications on each VM from the XML file.
NOTE: At this point the migration of VMs and Hosts can be safely performed. Once all VMs and hosts are moved to the new vCenter, unregister all your old vSphere Replication local and remote sites from the vRealize Orchestrator. Add the new vSphere Replication local and remote sites to vRealize Orchestrator and you then have to edit the XML file located in "/mnt/cifs-share/prod_replication_report.xml" by replacing 'XYZ' with your new vSphere Replication remote sitename in each VM entry - <RemoteSitename>XYZ</RemoteSitename>. You can then continue with the rest of the workflows.
5. Rename Folders back - This workflow gets all old replication details from XML and renames all the folders in remote datastore to reflect the original name. Basically takes out the "-old" suffix at the end.
6. Import Replications - This workflow imports all the details from XML and starts setting up replications for each entity and uses the destination disks as seeds.
P.S. I couldn't find a way to export the number of instances per day detail of the replications in XML, so when importing I had to hard code it to 3, since thats what we used on each replication. You can change this info before running workflow no.6 by editing line 31 and 35 in the script by replacing X to your set value - var numInstances = X;