VMware SRM Configuration step by step

VMware SRM used as a solution to bring up VMs in disaster recovery. SRM can be used for storage replication and VM based replication. In this article we are going to explain about VMware SRM configured for Hitachi storage array-based replication. First setup servers (physical or VM) in both production and DR site. Install VMware SRM which is compatible with your vCenter server version.
Abbreviations
SRA – Storage Replication Adaptor
HORCM – Hitachi Online Remote Copy Manager
MU – Mirror Unit
RDM – Raw Device Mapping
P-VOL – Primary Volume
S-VOL -Shadow/Secondary Volume
CoW – Copy on Write
Preparation steps
You must get command devices from storage vendor and mount to SRM VMs as a RDM in both prod and DR sites. You have to get CCI binaries from storage vendor. Install in SRM both servers. The command device is used for running storage commands which interacts with storage array to execute the commands. CCI binaries have all storage related commands.
Install SRA which is compatible with your storage array. You can download this from vmware site and install in both prod and DR SRM VMs.
You must share replication LUNs naa id with storage team to prepare HORCM file. Storage team will prepare set of files for prod and DR based on your DR solution. You may have file names like this HORCM0 (prod site for P-VOL) and HORCM1 (DR for S-VOL), HORCM2 (DR for T-VOL). Storage LUNs which are in replication in production site are called P-VOL (primary volume) and replicated LUN at DR site are called S-VOL (secondary or shadow volume), You can perform DR for directly S-VOL or you can go for an option to take snapshot from S-VOL and create T-VOL (Temporary volume). It’s all up to the DR design solution.
In Horcm files MU value denotes that you are using S-vol or T-vol for DR.
Ensure VMs and its disks are in correct datastores to ensure SRM work smoothly without hassles.
VMs all hard disks must in datastores which are in replication.
If there are multiple storage VSPs then VMs associated disks can be in different LUNs but from same VSP storage.
If there are consistency groups configured for storage LUNs, make sure all VM disks are placed in same consistency groups.
If you miss any of these storage datastores pre-requisites your SRM configuration would be failed.
  1. Login to Prod SRM server and place the horcm0.conf file under C:\Windows
  2. Login to DR SRM server and place the horcm1.conf & horcm2.conf files under C:\Windows
  3. Go to C:\horcm\etc path and execute “horcmstart 0” to trigger the horcm file in Prod SRM server.
  4. Go to C:\horcm\etc path and execute “horcmstart 1 2” to trigger the horcm file in DR SRM server.
  5. Execute the “pairdisplay” command given by the storage team and ensure all are in “PAIR”status.

6. Right click on DR site -> connect -> Use the credentials to establish connectivity between Prod and DR SRM servers.

7. Ensure it’s the icon is changed. This entails that the sites are now connected.

8. Right click on the Prod VC folder and click on “Add Array Manager”

9. Give a relevant display name and click “Next”.

10. Add the CCI server as HORCMINST=0 and enter “dummy” as username and password and click “Next”

11. Click “Finish” when it’s successful

12. Add the “Array Manager for DR site” by changing the HORCMINST value to 1 & 2 as below. All the other procedures remain same.

Creating Protection Groups in SRM servers 
  • Click on “Protection Groups tab”.
  • Right click on “All Protection group” and click “Create Protection Group”.

 

  • Click on the first RAID pair and click “Next”.
  • Ensure all the checkboxes are enabled next to all the “Datastore Groups” and click “Next”.

 

  • Note that all the virtual machines which are in the chosen datastores are listed in the bottom section in the above picture.

 

  • Mention any meaningful name and description. Click “Next” when done.
  • Review the summary and click “Finish”.
  • Click on the “Protection Groups” tab and click on the newly created “Array Pair”. All the associated VMs can be seen in the “Virtual Machines” tab.
    • Note: Errors can be solved by detaching the “CD/DVD Drive” of the reported VM. Right click on the VM à Properties à Click on the CD and click “Detach”.
Creating Recovery Plan

Click on “Recovery Plans” tab and right click on “All Recovery Plans” à “Create Recovery Plan”.

  • Click on “DR site” à “Next”.
  • Ensure all the protection groups and chosen and click “Next”.
  • Review the network information here for all the “In-scope” virtual machines and set the DR network accordingly and click “Next”. Note that the VLAN information is available with “DXC BCS team”.
  • Name the recovery plan with description (if needed) and click “Next”.
    • Review the summary and click “Finish”.
    • Now the “SRM DR” recovery plan is ready to be tested.
Testing the Recovery Plan
  • Right click on “SRM DR” à “Test”. 
  • Verify the protected and recovery site details and click on “Next”
    • Note: “Number of VMs” may display the count higher as there could be “Out of DR scope” VMs present in the datastore groups. It’s a known issue and can be safely disregarded.
      • No need to choose the checkbox “Replicate recent changes to recovery site” as we are using TVOL which is in “SPLIT” state. There is no replication happening between SVOL and TVOL during the DR.

      Verify the details and click on “Start” to trigger the failover

  • Below is the summary of the test result which displays the total duration & number of errors. Full report can be viewed/exported from “History” tab
Clean-up the DR VMs via SRM
  • Click on “Recovery Plans” tab.
  • Find the recovery plan that needs to be cleaned up. Right click and choose “Cleanup”
  • Click “Next”
  • Review the information and click “Start”
  • Make sure it completes successfully.