In last post of this series,we learnt about Recovery options available with vCloud Air Disaster Recovery and we discussed about Test recovery and actual recovery and saw the use case for both type.
In this post we will discuss about failback of a VM (which is recovered in vCloud Air) to on-premise. If you have landed straight to this post accidentally then I will urge you to check out previous blog posts which I have wrote on vCloud Air Disaster Recovery.
Failback of VM from cloud to on-prem is also known as Reverse Replication. When a VM is failed back to on-premise, the VM acts as a placeholder as direction of replication has now been reversed.
Before jumping into lab, lets discuss more about why and when you need to failback from cloud to on-prem. As discussed in last post of this series that we perform recovery of a VM to cloud under 2 circumstances.
1: When a planned maintenance is scheduled in on-prem or we have to change allocated resoure to VM which is replicating to cloud.
2: Actual disaster has happened in on-prem and you want to use Cloud VM to continue your business operations.
When a virtual machine on-premise is shut down for some maintenance and recovered in the vCloud Air Disaster Recovery cloud, the recovered virtual machine in vCloud Air services the clients and all traffic is re-directed to that machine. Any delta changes made on the virtual machine must replicated back to the on-premise machine after completing the maintenance window.
The reverse replication from seed allows only the changes in vCloud Air to be replicated back on-premise. Reseeding from an on-premise copy of the machine only serves a purpose when the local site does not experience a complete disaster and is just taken down for maintenance.
In this post we are going to learn how to do that. Lets jump into lab now and watch things happening in real.
1: To start with reverse replication, login to vCenter web-client and navigate to vSphere Replication > Outgoing Replication and select the VM which has been recovered in vCloud. At this point ensure that your on-prem VM is in shutdown state.
2: Right click on VM and select Reverse Replication from drop down menu
3: You will get a warning that “Existing VM in on-prem side will become inaccessible when configured for reverse replication”. What this means is that he on-prem VM will now act as a placeholder and not as an actual VM.Hit OK to continue.
4: At this time VM status in vCloud Air portal will read as “Reverse Replication In Progress”
5: Also in on-prem vCenter you will notice that VM has been disappeared from Outgoing Replication. Infact it has now moved under Incoming Replication (as replication direction has been reversed and its coming from cloud to on-prem)
6: The VM will now appear under Incoming Replication and VM status will read as Full sync but in actual the process is a delta sync as the on-prem VM will be now acting as replication seed and only the delta changes which has happened in VM when it was recovered in Cloud will be pushed to on-prem VM.
Once all delta changes has been pushed back in on-prem VM, the status changes to OK.
At this point you will observe that the on-prem has been disappeared from Inventory (as it is a placeholder VM only). You can verify the same by navigating to VM and Templates view and look for this VM.
7: At this point of time we can not use on-prem VM as it is only a placeholder. So in order to make it functional again we have to recover the VM in on-prem. Select the VM in question and click on Recovery.
8: Use “Synchorize recent changes” option and hit Next.
9: When on-prem will be recovered, the instance of VM which is running in cloud will be powered-off. If VMware tools is installed in Cloud VM and is working fine then you can opt for Guest shutdown option which will gracefully shutdown VM in cloud, else you can do a hard shutdown by selecting Power-off. Hit Next to continue.
10: Select the Datacenter/Cluster where VM will be placed
You will get a warning that vmx file for vm already exists. Click yes to overwrite the vmx file.
11: On Ready to complete page review your settings and hit finish.
12: Now you will see VM state will change to recovering
And few seconds later it will be fully recovered in on-prem.
You can verify the same by checking VM status in VCA portal.
13: Next is to stop the replication of this VM because we want on-prem VM as main VM and replication direction should be On-prem > Cloud (as cloud VM is there for disaster situation only). Right click on VM and select Stop from dropdown menu.
Stopping the replication will remove VM from incoming replication tab.
14: Next is to break the replication relationship which exists between on-prem VM and Cloud instance as new replication can only be configured when you have removed all other old replication.
To do so Login to VCA portal and select appropriate VDC and navigate to Replication Status tab and select the VM and click on “Remove Replication“
Note: Removing Replication do not delete the cloud VM. It just break the replication relationship of the VM.
A confirmation dialouge box will appear. Click on yes to remove replication.
15: Now come back to your on-prem VC and select the VM which you recovered a while ago and right click on it and select Configure Replication > Replicate to a Cloud Provider. Hit Next to continue.
16: Select the target site and hit next.
17: In target location, select Use replication seeds and hit Next.
18: Select the replication seed amd hit Next.
On Ready to complete page review your settings and hit finish.
19: And once again replication from on-prem to cloud will be established and VM will appear under outgoing replication.
In VCA portal you will see “Replication in Progress” status for the VM.
At this point of time your On-prem VM is happy, Cloud VM is happy and ofcourse you will be super happy as with minimum of effort and minimum downtime yor business critical application is up and running again.
Isn’t this beauty of vCloud Air Disaster Recovery solution 😉
I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing. Be sociable