vSphere 5.0 Tip To Toe: Install SRM 5.0 and Configure vSphere Replication (The Imageless Reference)

After spending a couple of days with the company of the beloved Site Recovery Manager 5 from VMware I have a come across a fact that I really should honor this product and write something about it as it was very delightful and very exciting to work with.

At all levels SRM 5 is quite what I expected in terms of vSphere Replication, you’re no longer bound to purchase high end storage boxes along with their replication licenses, a simple fact that you just take your VM on a cruise to anywhere you see fit beginning from a SAN down to the bottom of DAS.

I’ve a POC for a client and I was so enthusiastic about it I felt like I’m going to buy it if the customer doesn’t :-P, yeah that’s when you’re over committed…any way.

In the hereunder I will list in details the steps and prerequisites to obtain a healthy recovery-able SRM installation.

Prerequisites:

1- If you’re still with the basic MSSQL 2008 Express installation you’ll need to install the management tools in order to create databases (http://www.microsoft.com/en-us/download/details.aspx?id=22985).

2- You will need an additional vCenter along with host/s connected to it (doesn’t matter if you have a cluster or not as long as you have at least a single hypervisor).

3-  You will need the 4 additional IP addresses for a basic installation 2 IPs/site (vSphere Replication Servers Manager VRMS and vSphere Replication Server/s VRS ), also make sure you have  an A record for all the IP addresses in your DNS with reverse lookup.

4- Make sure that end to end connectivity between both replication sites and here is a KB from VMware stating the ports that needs to be opened in order to insure a successful end to end replication (http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1009562).

5- Make sure that all the addresses you use have an FQDN in your DNS server.

Pre-configuration (On both vCenter Servers):

1- After installing MSSQL 2k8 management tools, connect to the VIM_SQLEXP instance and create two databases on each site the first database is for SRM itself and the second would be for Host Based Replication HBR with collation LATIN1_GENERAL_CI_AI and assign it to the designated user or create one to suite your environment’s security.

2- Now you must enable the mixed mode authentication for the VIM_SQLEXP instance, connect via the management console on the top tree right-click the database instance and click on its properties then click on Security and choose mixed mode (SQL and Windows authentication), don’t restart the services yet.

3- Open SQL Configuration Manager and click on SQL Server Netwok Configuration, expand it and  click on Protocols for VIM_SQLEXP. Make sure you have TCP/IP enabled and then right-click on it and go to its properties, select the second tab IP Addresses, scroll down till you reach the very bottom you’ll noticed a section called IP All, here you will have to do two things first clear the data in the field TCP Dynamic Ports and in the TCP Port field type in the port number 1433.

4- Now you can restart the SQL server with VIM_SQLEXP instance make sure you do it from services.msc and not from the MSSQL management console because then you will have to start the vCenter services manually where is if you do it from the services console it will restart them automatically upon confirmation.

5- This is the last step in pre-configuration, for SRM to be installed it needs to communicate with the SRM database which we’ve created, this happens via a 32bit ODBC connection so DONT go to your Administrative Tools and then select the Data Sources (ODBC) because that’s the 64bit version of it ;-). In order to launch the 32bit data source go to C:\Windows\SysWOW64\odbcad32.exe. Go to the System DSN and add a new data source using the SQL Server Native Client 10.0 driver.

Just put in the name of the database and then put the vCenter’s_hostname\VIM_SQLEXP for the server, click next and when you get to the section where you choose the default database, select the SRM database which we’ve created and then click next and finally test your ODBC connection, if all is configured well it should return a successful connectivity attempt.

6- Connect to your vCenter via the vSphere Client and from the vCenter’s home go to vCenter Server Settings, now click on the third item Runtime Settings and in the Managed IP Address field fill in the IP address of the vCenter server, this will enable us to use the vCenter Server extensions that are required prior to deploying the VRMS and VRS virtual appliances.

SRM 5.0.1 Installation (On Both Nodes):

1- After you’ve downloaded SRM 5.0.1 from here https://www.vmware.com/tryvmware/?p=vcenter-srm5&lp=default you run the installation on both of your vCenter servers. the installation process is straight forward and while going through it you will be asked for the FQDN of the vCenter server along with the credentials to access it.

On the other hand when you reach the database configuration window you can click the drop down menu and select the SRM DSN which we’ve created in the pre-configuration steps.

2- Once the setup has finished, open the vSphere Client and connect to your vCenter and then on the top menu bar, go to plugins and then Manage Plugins you will notice that there is a new available plugin VMware vCenter Site Recovery Manager Extension, now download and install the plugin. Once done go to vCenter’s home and you will notice a new section named Solutions and Applications under it the new shiny Site Recovery button.

Now we’re done with the SRM 5.0 installation now we have to begin its configuration (remember that you have to install SRM 5.0.1 on both vCenter nodes).

SRM 5.0 Initial Configuration:

1- Now open your vSphere Client and click on the Site Recovery button, it needs a couple of seconds to connect.

2- First things first we must introduce both sites and connect them to each other, on the left menu click on the Sites and go to the Summary tab and on the right click on Configure Connection, you will be prompted to enter the vCenter server address and port, click next, now put the credentials of your vCenter server, click next and once the connection is established you will find upon the completion on the connection in the final results either lots of green check marks which means that the connection has been established successfully, click finish.

Note that the connect can be define from either one of the sites it doesn’t need to be configure from both sites.

3- Now on both sites you will be prompted to accept the vCenter SSL certificate of each server, put a check mark that you accept the certificate and then click ignore.

4- From now one each time you open the Site Recovery plugin you will be prompted to put the credentials of the remote site, either if you are at the HQ site you will be prompted for the DR and if you are the DR site you will be prompted to put the HQ one.

By now you should see that both of your sites appear in the sites window.

5- Once you’re connected, you should find next to the Summary tab multiple tabs related to mappings that should be done to ensure that all the virtual machines data and configuration are replicated to their proper end, and vice versa, again I emphasis that most of the things you do in SRM 5.0 must be done on both sites and when you finish configuring the mappings of the first site you should configure the mapping on the second site.

Configuring vSphere Replication:

As topic says sadly I don’t have the means to prepare for an Array based replication but surely I will be doing it in future notes, now lets configure the magical stage of vSphere Replication.

To configure vSphere Replication there are multiple steps that needs to be done prior to even thinking of replicating a virtual machine, since vSphere Replication relies on virtual appliances these needs to be deployed on each site as these appliance we handle the replication process.

Under the Array Managers menu you will find the vSphere Replication menu, now this is the only Get Started menu that I really like with other ones I’d say close the get started tab and see where all the configuration links are located because if you rely on the get started menu to do everything most of the times you will miss much of the cool features that are hidden with in.

1- We begin with the deployment of the VRMS which stands for vSphere Replication Management Server each site is entitled to have only one VRMS server because logically you can have one entity to manager multiple entities in our case are the VR servers that we are going to deploy later on, VRMS is based on SUSE Enterprise Linux.

Once you click the link which starts the deployment of the VRMS server you’ll will be prompted to put a password for the root user, when you click next you will be prompted to provide the network configuration for this appliance (Gateway, IP, DNS and Netmask), make sure you choose different names for the VRMS servers on both sites because if you put the same default name for the virtual appliance you’ll get a nice window in the future stating that the appliances have the same name and you’ve done something dum dum ;-) again this is done on both sites as each site has its on VRMS.

2- When the deployment is done the virtual appliance gets powered, click on the next link which is Configure a VRM Server, this will launch an internet browser session connecting you to your VRMS URL https://your-vrms-ip:8080 here you’ll put the credentials which you’ve configured upon the deployment of the virtual appliance (root/password). Once you’re in click on the Configuration tab (must be done on both sites).

The first section you will be putting the database configuration in terms of DB Type, DB server address (remember to use the FQDN), DB port which we’ve set earlier to 1433 by default its there, the DB credentials and finally the database name.

The second section should be configured by default as it has the VRM server address and the site name which were configured upon the OVF deployment.

The third section includes configuring the vCenter’s address, port, credentials and the administrator’s e-mail, now on the top right in the actions section click on Save and Restart Service.

3- Upon finishing the configuration of the VRMS on both sites we will go to the third step of configuring vSphere Replication which is introducing and connecting the VRM servers on both sites to each other. From the getting started section click on Configure VRMS Connection you’ll be prompted to for the remote site’s credentials and you accept the certificate and you’re done =).

4- Now that the SRM sites are getting more acquainted to each other we must deploy the VR servers, not that you can a maximum of 5 VR servers per VRMS appliance where each VR appliance can handle up to 100 replication schedule. So again from the getting started section click on Deploy a VR Server, other than the regular OVF deployment steps you will be prompted to provide an IP address, gateway address, DNS and subnet mask.

If you’d notice you were not asked to provide a password for this appliance as you’re not supposed to configure anything in it unless you have your own CA certificate that you need to replace the original one with, in case you feel like configuring it the default username is root and password is vmware.

5- Once the appliance powers on wait for a couple of minutes so that VMware tools services to launch, so that we’d be able to register it. From the getting started section click on Register VR Servers, select the VR server which you’ve just deployed and once you get that green check mark on all of the steps we’re ready to start the replication of virtual machines.

Configuring the replication of a virtual machine:

Now each virtual machine has been equipped with a new option, go to your datacenter and from your inventory right-click on a virtual machine that you intend to test and you’ll notice that at the very end there is a new option vSphere Replication. Once the window launches, you’ll be able to set the RPO time, quiescing method (this can be either via VMware tools or you can use Microsoft VSS) and the target datastore for the configuration (vmx) file.

When you click next you will have to option to either replicated the disk (vmdk) or not, choose the destination of that VMDK and then choose whether the replicated disk will be created in thin or thick format.

Finally you’d select the VR appliance which will be handling this replication, once you click next and finish a directory for the virtual machine will be created in the datastore of the remote site and a full sync of the virtual machine will be triggered. To check the replication status, go to your home screen, site recovery, vSphere Replication, then click on the VR appliace which was assigned the replication (if you’re at HQ then you’ve chosen the DR VR, if you were at the DR site then you must have chosen the HQ VR) then click on the Virtual Machines tab.

Configure Protection Groups and Recovery Plans:

Now you can do nothing unless the full sync has finished, once that is confirmed. Click on Protection Groups and create a new Protection Group, protection groups are mere containers of virtual machines that have been enabled with VR, so that when you create a recovery plan you don’t have to do it for a single VM at a time.

Once the protection group is created you can move onwards to create a Recovery Plan, recovery plans define the steps and the way your protection group will be recovered at the DR site, for instance you can have it change the IP address of a virtual machine at the DR site or you can change the priority of the virtual machines power on, or something which I really like and fond of is applying dependencies for virtual machines as in if you have a service which is dependent on multiple virtual machines to operate properly you can add to the front end virtual machine dependencies so that it won’t power on unless x virtual machines are up and running.

The cool thing about Recovery Plans is that you can virtually test them, using the Test Plan button. Because from time to time you will need to verify that the replicated VMs will actually serve you when you need them, and in my experience if the test is successful then the recovery for sure will be successful.

After doing a test you can either, do a Planned Recovery or you can do a Disaster Recovery. With Planned Recovery SRM will check if the disks are at sync and then commence, other than that if the disk are not at sync it will fail which means you have to check the RPO and make sure you do the planned recovery after the disk are at sync, on the other hand when doing a disaster recovery even if the disks are not at sync the virtual machine will be recovered and it will launch on the DR site with some data lost.

A draw back in vSphere Replication is that you CANNOT Re-Portect the virtual machines, sadly this is only available when protecting via Array Managers. Nevertheless VMware has put the button and if you click it you will get an error yet I feel that they are telling us that there will be re-protection in future releases :-).

So what to do? Yup you’ve guessed it, you have to delete the configuration from the HQ site and reapply the configurations on the DR site all the way from enabling VR on the virtual machine till you finish off with a Recovery Plan, this means when you’re back to HQ and you want to reverse the process you will have to reconfigure the Protection Groups and Plans according to what they were so I suggest you have notes about everything you’ve done so that you won’t miss anything.

Finally have fun, SRM is a very reliable product and you will might want to consider it if you have a vSphere based infrastructure, if you don’t GO AND START PLANNING TO HAVE ONE ;-).

5925 Total Views 1 Views Today

Abdullah

Knowledge is limitless.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.