This guide will take you through the steps to configure vSphere Replication 6 as well as how to recover virtual machines in case of disaster.
If you have not yet completed the tasks prior to configuring vSphere replication, please go through the following articles.
You need to prepare your vCenter Server prior to deploying and configuring vSphere Replication 6. If you are done with vCenter preparation, follow the steps mentioned below to begin with the vSphere replication.
Configuring vSphere Replication 6
1. To begin with configuration process, first you need to download and deploy vSphere Replication 6 appliance. Click on the following link in step 2 if you have not yet deployed, otherwise move to step 3 and so on.
2. Deploy the vSphere Replication as a standard OVF template through your downloaded vSphere Replication .ovf file.
3. Once the OVF deployment complete, power it on. Now access you vSphere replication appliance GUI via https://replication_appliance_ip:5480 and log in as root.
Review Network settings by clicking on Network tab.
To add or modify Network configuration, click on Address tab and provide required info. I have just updated domain search path. Click on save settings to save the changes you made.
Now Switch to VR tab and click on Configuration to do the necessary configuration.
First provide the password of the SSO administrator. Verify the VRM host and VRM site name, this should reflect to vCenter FQDN where you want to register your replication appliance.
When you are done, click on Save and Restart Service
Click on Accept to complete the integration process.
Once your vSphere Replication appliance is registered to your vCenter Server, you will see a message highlighted in green that your configuration has been successfully saved.
Now logout and login back to vSphere Web Client. You will see the vSphere Replication plugin in main page of your vcenter Server.
Repeat the same steps for deploying and configuring 2nd vSphere Replication appliance on your target/DR site.
When done, click on vSphere Replication plugin available in the main page to navigate to the vSphere Replication. If both of your replication appliance is registered to different PSC then you have to add your DR site as target site by clicking on Configure button.
Since i am working in testlab, both of my vCenter Servers are using same PSC, so I can see Replication appliance status as Enabled and OK in following screen without performing any additional configuration.
Replicating a Virtual Machine using vSphere ReplicationAt this point our primary and DR sites are ready. The next step is replicating a VM from source site to the target site to test replication process working or not.
Navigate to VM and template view in vCenter Server in your source site and select a VM which you want to replicate to the DR site. Right click on that VM and choose All vSphere Replication Actions > Configure replication
vSphere Replication can be used to replicate VMs to the local DR site as well as to a cloud provider side such as vCloud Air . We are going for a local DR site replication so I will choose Replicate to a vCenter Server. Click Next to proceed.
Choose the target site where you want to replicate your VM. Make sure your target site should report as connected here. If it is showing as disconnected then fix it first or you will not be able to continue from here.
On replication server page, choose the replication appliance that will be handling the replication process. In a production environment, you may have multiple replication servers deployed, to handle all the VM replication traffic. In most cases, leaving it on “auto-select” is best.
I will choose the destination site replication appliance. Click Next to continue.
On Target location page, select the storage where the replicated files of VM will be stored. Click on Edit button to configure the appropriate datastore for your replicated VM.
Choose your appropriate datastore and Click OK.
When done, your screen will look similar to as shown below. Click Next to continue.
On Replication Options page, select the appropriate option of whether or not you want Guest OS to be quiescence on your VM when replication will be triggered.
Also you can choose Network Compression option to compress the data which will be replicated by the VR appliance. This a new feature that has been added to replication version 6 and to use this feature, you should have ESXi host v6 at both your primary and your target site.
Please check the compatibility matrix before using this option. We are using latest ESXi host and VR appliance at both sites, so we will go with this option.
Pay Attention: This is probably the most important page for configuring the replication options for a VM. I have explained it enough above in introduction section.
The first setting is the RPO setting and defines how often vSphere Replication replicates data from source site VM to target site VM. This can be a time range between 15 Minutes to 24 Hours.
The other option is Point in time instances. This setting allow for some snapshots to be maintained at the DR site for this VM at certain intervals. The benefit is that if a guest is corrupted, you have multiple points in time to failover from in case the corruption already replicated across sites.
Review your settings and click Finish.
You will see a task “Configure a VM for replication” triggered in vCenter server.
You can verify the presence of your replicated VM by going into the target site vCenter and browsing the datastore where your VM is getting replicated.
You can monitor the status of the replication task by selecting the Monitor > vSphere Replication tab in vCenter Server on both source and target site. At the target site, replication statistics will be visible under Incoming Replication, and at the source site it will be visible under Outgoing Replications.
When replication is kicked off first time on a VM, it will be always a full sync task. Once a VM is replicated to DR site, only changes of source VM will be replicated to target site and this depends on the RPO value you set earlier.
Once a VM is replicated completely on DR site, you will see the VM status as OK on both sites.
Recovering a VM at Target Site
Consideration: When disaster takes place in your source site, you can go to your DR site and recover your VM which is being replicated over there. To perform recovery of a VM, login to vCenter Server of target site and select the replicated VM right click on it.
You have many options here like Pause the replication, Stop the replication or perform a manual sync of the replicated VM to get the changes from source VM. If you want to move this VM to other VR appliance, you can (if you have more than one VR appliance deployed on target site)
We will choose Recovery option here.
On Recovery Options page you will see several options. The first option is:
Synchronize recent changes: This is only available if the primary site is up and running however this settings require source VM to be in powered off state.
Use latest available data: This option can be used even if the source VM is up and running.
Point in time recovery: Since we did not choose to keep any snapshot of our VM in DR site so this option is not available for us. In production environment it is recommended to configure Point in time instances option while configuring replication on a VM, so that your DR site can have multiple snapshots on the replicated VM and you can simply choose in the snapshot manager if we need to go back in time a little with our recovery. This is a very useful feature if you are failing over due to corruption, and need to roll back before it occurred.
The moment we switched to use latest available data, validation succeeded.
To test the synchronize option, we have powered off VM on the source site. Replication status changed to Not Active due to this as you can see in image below.
Now there is no any validation issues. Click Next to continue.
Select the destination where the VM will be recovered on target site. Click Next to continue.
If you have more than one cluster at the DR site, choose the correct cluster where the replicated VM will be registering itself.
On ready to complete page, review your settings and click Finish to start recovering the VM at DR site. You can choose to power on the VM after recovery.
You can see the recovery tasks in vCenter Server. Once the task is completed, the VM state will report as Recovered in vSphere Replication page on DR site.
This guide demonstrated the deployment process of vSphere Replication Appliance as well as the configuration and recovery steps of vSphere Replication 6. I hope this will be helpful to implement vSphere replication within your virtual environment.