What you'll learn in this tip: Learn about VMware's vSphere Replication for VMware Site Recovery Manager 5, how it works, its most important features and what's required to use it.
VMware’s Site Recovery Manager (SRM) provides an automated solution for failover of virtual server environments to a recovery site. The previous version (version 4) was not a complete solution for disaster recovery and relied on a third-party storage application to handle the replication of virtual machine data to a recovery site. This meant that you needed an expensive storage array that supported the replication of virtual machine datastores at the primary and recovery sites.
VMware has introduced a new feature called vSphere Replication—part of the vSphere 5.0 and SRM 5.0 releases—that allows for the replication of virtual machines at the virtualization layer, as opposed to the storage layer.
vSphere Replication is cheaper than storage array replication, because having replication built in to SRM means you don’t have to purchase a storage array that supports replication. With many storage arrays, replication is an optional added-cost feature.
Compatibility is another advantage of vSphere Replication. When you use storage replication you can only use a storage device that has a Storage Replication Adapter (SRA) that is intended for use with SRM, which could limit the storage devices you can choose from. It also made it necessary to rely on the storage vendor to deliver and update the SRA for each release of SRM. With vSphere Replication, you no longer have to worry about that because the replication is built into the hypervisor. This also allows for better integration and makes implementation much less complicated as well.
vSphere Replication features
vSphere Replication leverages the Changed Block Tracking (CBT) feature in vSphere to copy only changed blocks to the recovery site. The use of CBT allows for both lower bandwidth utilization and more aggressive recovery point objectives (RPOs) when compared with full-system copies of virtual machines. vSphere Replication requires both vSphere 5 and SRM 5, as it is not a native vSphere 5 feature and cannot be used without SRM 5.
vSphere Replication offers the following features:
- Before each replication cycle, it leverages Volume Shadow Copy (VSS) through VMware Tools to ensure that the guest OS is quiesced so it is in a consistent state.
- Allows users to choose what to replicate using the vSphere Client, individual VM disk files, entire VMs or groups of VMs.
- Can operate in parallel with array-based replication so replication can be tiered to offer greater flexibility and more options.
- Works independently of an underlying storage device, which allows for replication between heterogeneous storage devices.
- Provides the ability to easily remap virtual machine disk files at the recovery site to alternate datastores when needed.
- Supports RPOs from 15 minutes to 24 hours.
While the vSphere Replication technology is built into the hypervisor in vSphere 5, it requires the assistance of a virtual appliance to handle the replication between sites. There are two virtual appliance types: the vSphere Replication Management Server (VRMS) and the vSphere Replication Server (VRS). The VRMS allows you to centrally manage replication across multiple hosts abd the VRS is the engine that handles the actual replication of data. There is also a vSphere Replication Agent (VRA) that runs as a service on each host at the primary site to handle copying the data to the vSphere Replication Management Servers at the recovery site.
For replication to work, you need to deploy a single VRMS and a single VRS at the recovery site and a single VRMS at the primary site. However, this only allows you to replicate to the recovery site, and does not allow you to fail back at all. To achieve two-way replication and failback capabilities, you also need to deploy a VRMS and a VRS at the primary site as well. You can optionally deploy multiple vSphere Replication Management Servers at each site so you have load balancing for virtual machine replication. Each VRMS must also be registered with a corresponding vCenter Server located at each site and the VRMS at the recovery site must be paired with the VRMS at the primary site. In addition, each VRS must also be registered with a VMRS before you can use it for replication.
Once the VRMS and VRS are deployed, you can configure datastore mappings to define which datastores are used at the recovery site. Datastore mappings are determined based on the source datastores for VMs at the primary site that are being configured for replication. The source datastore at the primary site maps to a destination datastore at the recovery site. A source datastore could contain a single VM on a single datastore or many VMs located on multiple datastores. While mappings for a single VM can be overridden, mappings for multiple VMs are forced to use datastore mappings and cannot be overridden.
Once mappings are configured, you can enable replication for either a single or multiple virtual machines. To enable replication, you simply select one or more VMs in the vSphere Client and choose the option for Site Recovery Manager vSphere Replication. You can then configure replication settings such as the destination datastore location at the recovery site, replication schedule and quiescing options. A RPO slider allows you to change the replication interval from 15 minutes to 24 hours. The network bandwidth available between sites and the amount of data changing on the VM will help determine the interval you choose. Replication needs to be able to complete before the next interval starts to ensure that you meet the RPO you choose. You can choose to have a VRS automatically assigned to the VM or you can manually choose one.
Once VR is enabled and VMs are configured for replication you are prepared in case a failover is needed. One disadvantage of using VR is that while SAN replication supports automatic re-protection (failback) after an event occurs by reversing replication, VR does not support this. Once a failover occurs with VR replication, users must manually establish stops and re-protection. The existing replication from the primary site to the recovery site must be reconfigured for the opposite direction, along with protection groups and recovery plans. VMware plans to add automatic re-protection in a future release.
vSphere Replication is a much-welcomed feature as it makes implementing SRM within the reach of smaller companies that do not have the budget for expensive SAN devices and replication products. The fact that you can use local disk or direct-attached storage can drastically reduce the cost and complexity of implementing SRM. vSphere Replication is brand new feature, so it lacks some of the maturity and features compared to other third-party products that offer replication at the virtualization layer. But it is the only host-based replication product that works with SRM, and for those looking for an affordable and well-integrated disaster recovery solution it is an attractive option.
About this author: Eric Siebert is a VMware expert and author of two books on virtualization.