Replicating VM between sites using vSphere Replication

Once your primary and DR site is ready, you can start replicating VM’s between the sites and test the failover/failback etc to ensure your disaster recovery plans are functioning well and you will be protected when actual disaster happens in your on-premise datacenter.

In this post we will learn how to replicate VM from one vCenter to another which is in DR site. Lets get started.

Navigate to VM and template view in vCenter server in your source site and select the VM which you want to replicate to the DR site. Right click on the VM and chose All vSphere Replication Actions > Configure replication

config-9

vSphere Replication can be used to replicate VM’s to the local DR site as well as to a cloud provider side such as vCloud Air . In our example we are going for a local DR site replication so I chose Replicate to a vCenter Server. 

config-10

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 the issue first else you will not be able to continue from here.

If your target site is showing as connected. hit Next to continue.

config-11

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.

In my case I choose the destination site replication appliance. Hit Next to continue.

config-12

On Target location page, select the storage where the VM will reside post replication. Click on Edit button to configure the appropriate datastore for your replicated VM.

config-13

Make your selection and hit OK.

config-14

After your selection, your screen will look like as shown below. Hit Next to continue.

config-15

On Replication Options page, select the appropriate option of whether or not you want Guest OS to be quiesced 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 VR6 6 and to use this feature, you should have Esxi host v6 at both your primary and your target site. I have discussed in detail about this feature in my last post

Please check the compatibility matrix before using this option. In my lab I have my Esxi host and VR appliance at v6 at both sites, so I went ahead with this option.

config-16

This is probably the most important page for configuring the replication options for a VM.

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 RPO settings depends on a number of factor and to know more about it I would recommend reading this article by Jon Kohler.

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 being that if a guest is corrupted, we have multiple points in time to failover from in case the corruption already replicated across sites.

config-17

On ready to complete page review your settings and hit finish.

config-18

You will see a task “Configure a VM for replication” triggered in vCenter server.

config-19

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.

config-20

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 delta changes of source VM will be pushed to target site and this push depends on the RPO value you set earlier.

config-21

config-22

Once a VM is replicated completely on DR site, you will see the VM status as OK on both sites.

config-23

I hope you find this post informational. Feel free to share this on social media if it is worth sharing. Be sociable 🙂