First we are going to discuss Replication With VR and then will cover Array-based Replication.
To protect a single virtual machine or a group of virtual machines, the virtual machine files need to be replicated from the Protected Site to the Recovery Site. Since we have already set up a VR infrastructure we will proceed using this mechanism. Here we will skip the replication configuration of a single VM and concentrate on configuring replication of multiple VMs since it’s the most common setup in a virtual infrastructure.
Configure Replication for multiple VMs
1). Open the vSphere Client and from the Home page go to VMs and Templates.
2). Select a folder in the left pane and select the Virtual Machines tab. Select All the VMs you want to configure Replication. Right-Click the selected VMs and choose vSphere Replication from Drop Down..
3). In the Configure Replication wizard, select desired Recovery Point Objective (RPO – Minimum 15 min and Max 24 hr), and lease the “Initial copies of .vmdk files have been placed on the target datastores” un-checked since we didn’t copy the files to the Recovery Site. Click Next.
Configure Datastore Mapping
Now that the replication of VMs has been set up, we need to create the datastore mapping for the replicated VMs on the Recovery Site.
1). On the Protected Site, open the Site Recovery Manager and select vSphere Replication in the left pane. Select the Protected Site and go to the Datastore Mappings tab.
5). To check if the replication is running, select the Recovery Site in the vSphere Replication and select the Virtual Machines tab. You should see something similar to the screenshot below.
Now Let’s discuss and configure VMs with Array-Based Replication
A datastore group is a container that aggregates one or more replication-enabled datastores. The datastore groups are created by SRM and cannot be manually altered. A replication-enabled datastore is a datastore who’s LUN has a replication schedule enabled at the array.
A datastore group will contain only a single datastore if the datastore doesn’t store files of virtual machines from other datastores. See the preceding single-datastore datastore group conceptual diagram.
A datastore group can also contain more than one datastore. SRM aggregates multiple datastores into a single group if they have virtual machines whose files are distributed onto these datastores. For example, if VM-A has two VMDKs placed on datastores Datastore-M and Datastore-N each, and then both these datastores become part of the same datastore group.
“A protection group is a group of virtual machines that fail over together to the recovery site during a test or a recovery procedure.”
Unlike vSphere Replication, SRM cannot enable protection on individual virtual machines. All the virtual machines that are hosted on the datastores in a datastore group are protected. Meaning, with SRM, protection is enabled at the datastore group level. This is because, with an array-based replication, the LUNs backing the datastores are replicated. The array doesn’t know which VMs are hosted on the datastore. It just replicates the LUN, block by block. So, at the SRM layer, the protection is enabled at the datastore level. In a way, a Protection Group is nothing but a software construct to which datastore groups are added, which in turn includes all the VMs stored on them in the Protection Group.
When creating a Protection Group, you will have to choose the datastore groups that will be included. Keep in mind that you cannot individually select the datastores in a datastore group. If it were ever allowed to do so, then you will have virtual machines with not all of its files protected. Let’s assume that you have a virtual machine, VM-A, with two disks (VMDK-1 and VMDK-2) placed on two different datastores. Let’s also say VMDK-1 is on Datastore-X and VMDK-2 is on Datastore-Y. When creating a Protection Group, if you were allowed to select the individual datastores and if you choose only one of them, then you will leave the remaining disks of the VM unprotected. Hence, SRM doesn’t allow selecting individual datastores from a datastore group as a measure to prevent such a scenario. The following diagram shows the modified conceptual structure of the datastore group:
Creating Protection Group Based on VR (vSphere Replication)
The protection group can be used in one or multiple recovery plans which we will create later. Protection groups can be Array-based or VR-based. In this case we will create a protection group based on vSphere Replication since it was configured in the previous part.
Create Protection Group
1). On the Protected Site, open the Site Recovery Manager and select Protection Groups in the left pane. Click on Create Protection Group to start the wizard.
Now that the VMs are protected we can start building a recovery plan. where we will configure a recovery plan for our VMs.
Creating Protection Group Based on Array-based Replication
A Protection Group is created in the SRM UI at the protected site.
The following procedure will guide you through the steps required to create a Protection Group:
1. On the Protected Site, open the Site Recovery Manager and select Protection Groups in the left pane. Click on Create Protection Group to start the wizard.
3). On the next screen, choose a datastore group that you would like to protect. When you select a datastore group, the bottom pane will list all the VMs hosted on the datastores in the group. You cannot individually select the VMs though. Although I have selected only a single datastore group, we can select multiple datastore groups to become part of the Protection Group. Click on Next to continue
The Protection Group Name can be any name that you would prefer to identify the Protection Group with. The common naming convention is to indicate the type or purpose of the VMs. For instance, if you were protecting the SQL Server VMs, then you might name the Protection Group as SQL Server Protection Group; or, if it were to be a set of hyphenate VMs, you may name it as High Priority VMs Protection Group.
5). On the Ready to Complete screen, Review the wizard options selected and click on Finish to create a Protection Group:
So, what exactly happens when you create a Protection Group?
When you create a Protection Group, it enables protection on all the VMs in the chosen datastore group and creates shadow VMs at the recovery site. In detail, this means that at the protected site vCenter Server, you should see a Create Protection Group task complete; subsequently a Protect VM task completes successfully for each of the VMs in the Protection Group. See the following screenshot for reference:
At the recovery site of the vCenter Server, you should see the Create Protection Group, Protect VM (one for each VM), Create virtual machine (one for each VM), and Recompute Datastore Groups tasks completed successfully.
As they are solely placeholders, you cannot perform any power operations on it. There are other operations that are possible but are not recommended. Hence, a warning will be displayed, requesting a confirmation, as shown in the following screenshot:
In the next part we will discuss Recovery Plan, Testing and Performing a Failover and Failback. Click here to continue to part 7.
Note :- I have used pictures in this post from SRM book written by Abhilash GB and from blog (http://defaultreasoning.com) by Marek.Z and would like to Thank both of them 🙂