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.
4). Select the appropriate VR Server (If you have multiple VR Servers) at the Recovery Site or leave the setting to Auto-assign VR Server. Click Next to proceed.
5). Review the settings and click Finish.
6). Click Close when the Configuring Replication process is completed.
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.
2). Select datastores under the Source Datastore and map it to the appropriate datastore at the Recovery Site by clicking on the Configure Mapping button.
3). In the Datastore Mapping window, select the appropriate datastore and click OK.
4). Verify the mapping under the Target Datastore column on 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.
OK, so the files of the virtual machines are now synchronized between the Protected Site and Recovery Site. Let’s proceed now with configuration of the Protection Group.
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:
Note:- That a datastore group cannot be a part of two Protection Groups at the same time.
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.
2). In the Create Protection Group wizard, select the Protected Site and vSphere Replication as the protection group type. Click Next.
3). In the Select Virtual Machines window, select the VMs you want to add to this Protection Group and click Next.
4). Provide a suggestive Protection Group Name and alternatively a Description for this Protection Group and click Next.
5). Review the settings and click on Finish when ready.
6). Wait until the Protection Group is configured. You can monitor the progress in the task pane.
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.
2). In the Create Protection Group wizard, select the Protected Site and Array based Replication (SAN) as the protection group type and Correct Array pair Click Next.
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
4). In the next screen, provide the Protection Group Name and an optional description, and 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 shown in the following screenshot, the shadow VMs appear in the vCenter Server’s inventory at the recovery site:
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:
The placeholder datastores will only have the configuration file (.vmx), teaming configuration file (.vmxf), and a snapshot metadata file (.vmsd) for each VM.
These files will be automatically deleted when you delete the Protection Group.
In the next part we will discuss Recovery Plan, Testing and Performing a Failover and Failback. Click here to continue to part 7.
Click here to go to vCenter Site Recovery Manager (SRM) 5.X – Part 1
Click here to go to vCenter Site Recovery Manager (SRM) 5.X – Part 2
Click here to go to vCenter Site Recovery Manager (SRM) 5.X – Part 3
Click here to go to vCenter Site Recovery Manager (SRM) 5.X – Part 4
Click here to go to vCenter Site Recovery Manager (SRM) 5.X – Part 5
Click here to go to vCenter Site Recovery Manager (SRM) 5.X – Part 6
Click here to go to vCenter Site Recovery Manager (SRM) 5.X – 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 🙂