SRM 5 vSphere Replication – how to install and configure

In this article I want to focus on the installation and configuration of SRM 5 vSphere Replication. This new feature will provide bi-directional replication of Virtual Machines between your production vCenter and your DR vCenter. These Virtual Machines can be located on any type of storage; SAN, NAS, within Datastores created by vSphere Virtual Storage Appliance, or even DAS Datastores.

The last one in particular might be very interesting for very small environments or for branch offices.

During my testing, I have found that there a few strange quirks and the documentation supplied by VMware is not very well written to explain why things might not work as expected.

So in this article I will start with some basics regarding IP-addressing, DNS, database setup, and go through the installation, setup, and the things to pay attention too.

One of the most important pieces to get this setup configured correctly is the correct setup of DNS.

We have to make sure that we create DNS entries for everything we create and setup and that we use Fully Qualified Domain Names for everything we configure. I know it sounds as the most logical thing to do, but most problems are caused by not following this simple rule.

Before you install vCenter you have to make a few decisions regarding your database setup. If you are only going to host vCenter on this server and will not install another VMware application on this server, depending on the size of your environment, you might be able to use the free SQL Express database.

If you are planning on hosting other applications, like in this case SRM, the SQL Express server cannot be used. So before you install vCenter, install Microsoft SQL server. In my test environment I use Windows 2008 R2 64 bit with SQL 2008 R2 64 bit. We install the Database, Client connectivity, and Management tools. No need to install any of the other options.

Make sure that SQL is setup for both Windows Authentication and SQL Authentication. Later in the document you will understand why we need both. Use a Windows account for the Services to run under and set the SQL Agent service to Automatic. In my test environment I used ServiceVMware which is a Domain Admin in my domain ACME.LOCAL.

The installation for vCenter, SRM, and vSphere Replication do not create the databases within SQL so we need to do this manually. So when SQL has been installed, reboot the server, login as your service account and make sure that the SQL services started successfully.

Start SQL Server Management Studio and login. You can see below that my SQL server name is PROD-VC.acme.local and I am being logged in with the account that I used to login to the server: ACME\ServiceVMware.

For clarification, in my test environment I am using only one server that will host both SQL, vCenter, and SRM.

Once we are logged in we need to create three databases; onefor vCenter, SRM, and for vSphere Replication. Respectively they will be called, VCENTER, SRM, and VRMS_DB.

Most of us are not SQL DBA’s, so below are a few screenshots on how to create and setup these databases.

First we expand the tree on the left and right click on “Databases”, here we click on “New Database”

This will open up the New Database dialog box.

Here we put in the name of the database and the owner.  For the VCENTER and SRM database the owner is ACME\ServiceVMware.

For the VRMS_DB database the owner is going to be the SA account.  For our test environment setup using the SA account is fine. In your production environment you will want to setup a different SQL account for this purpose. The reason we use a SQL account for this database and not a Windows
account is because the VRM appliance, for some reason unknown to me, cannot handle Windows Authentication.

When you are setting this up in a test environment and you are not doing backups of the SQL database, you need to change the Recovery model from Full to Simple on the Options page as shown below.

When all three Databases are created, we need to do one more thing before we can start the installations. For vCenter and SRM to talk to the SQL server we need to create an ODBC Data Source. We do this by going into “Data Sources (ODBC)” which you can find in the “Administrative Tools”

Because we are runninga 64 bit version of Windows, the Data Sources application we just opened is the 64 bit version. vCenter uses a 64 bit Data Source to connect to SQL so we can create this Data Source here.

Click on the System DSN tab and click Add. Give it a name of “vCenter”, use the “SQL Server Native Client 10.0” Driver and make sure that you change the default database from “System” to “vCenter” If you do not change this, it will use the System dataset and you will have to start all over. Test the connection and if everything comes back as successful we can close the Data Sources application.

So what about the SRM and VRMS_DB databases? Do we not have to create data sources for them?

SRM uses are 32-bit connection, and the SRM installation gives us the opportunity to create it during the install. The vSphere replication database (VRMS_DB) does not use a Data Sources ODBC connection, so we do not have to do anything for it.

Now you are ready to install vCenter.

During the setup you will see the “Database Options” window asking if you want to install Microsoft SQL Server 2008 Express or use an existing supported database. As we already installed and configured SQL we use the existing supported database option. Open the dropdown box and pick the DSN you created. (vCenter)

On the “vCenter Server Service” window you should see your ServiceVMware account, put in your password and click “Next”.

You might get a warning that the FQDN cannot be resolved. If you configured your DNS correctly and you can ping your vCenter successfully by using its FQDN, then you can ignore this warning and move on.

For the rest of the Wizard use the default values and let the installation complete.

Once vCenter has been installed, install the vCenter Client.

Login to vCenter and create a Datacenter and Cluster and add your ESXi hosts. Remember that you create DNS entries for your ESXi hosts and add the hosts to vCenter by FQDN and not by IP-address.

We are now ready to install SRM, run the EXE and go through the wizard. Make sure to choose the radio button “Install vSphere Replication”.

On the “VMware vCenter Server” Windows type in the FQDN for the vCenter and the credentials for your Windows domain service account.

Once you click Next you will get a Security Warning regarding the Certificate. We will see these messages a few more times, just accept them. In your production environment where you have a CA setup, you can change these certificates, to makes these errors go away.

In our test environment we are going to use the automatic created certificates.

On the “VMware vCenter Site Recovery Manager Extension” window, we need to pay attention as making mistakes here will cause problems later on.

Change the “Local Site Name” to something that is more readable them what is automatically populated. Put in an email address and put in the FQDN for the “Local Host” It’s important that you use the FQDN for the host and not the IP-address from the dropdown box.

On the next window, we will supply the Database information. We have already created the database but have not created the DSN. Create the DSN as we did for vCenter. Don’t forget to change the default database from System to SRM. Supply the Windows credentials to connect to the database.


We have now completed the installation of vCenter and SRM on the Production side. At this point we need to do the same on the DR site. The setup is exactly the same, install SQL, vCenter, and SRM and make sure you point to the DR SQL server for the location of the Databases. Once completed we can setup the connection between the SRM servers, configure the replication servers, and start replicating Virtual Machines.

If you still have the vCenter client open, close it and re-open it. Once logged in go to Plug-ins and install the SRM plugin.

Once complete, Click Home and at the bottom you will find the SRM application. Open the application and you will see the screen below. Click on “Configure Connection”

Go through the wizard, put in the remote site information. Use the FQDN for the server, not the IP-Address. In my test environment the FQDN for the DR vCenter server is DR-VC.acme.local

On the authentication page, put in your Windows service account and password. For example ACME\ServiceVMware

Finish the wizard and wait for the connection to complete. Once you close the wizard you will receive an Authentication window. Put in your Service account username and password. As used in the wizard.

Before we continue we need to change an additional setting. If we don’t we will receive an error when we deploy the VRM VM’s.

Go to the Home screen and open up “vCenter Server Settings”.

Here, go to the Runtime Settings section and fill out the IP-address of the vCenter server.

Click Ok to close out the windows and go back to SRM.

We can deploy the Replication Management servers on both theProd and DR side.Click on the left side on vSphere Replication and on the right side of the screen clik “Deploy VRM Server”

The Deploy OVF Wizard will come up. Click Ok to start the wizard. The wizard is pretty standard, but there are a few things to watch out for.

One of them is the name of the VM.  During my tests I have found that using the
default name for the Prod VRM and DR VRM server will cause problems. So change the default name as I did, so they are unique on both sides.

The next one is the properties page. Make sure that you fill out the IP addresses.Do not use DHCP. Finish the wizard and let the VM deploy.

At this point we also want to go ahead and set the vCenter IP-address in the vCenter Server Settings section, and deploy the VRM server on the DR site.

Once we are done on the DR site, we can go ahead and configure the VRM’s on both sites.

Click the link and a web browser will open. The username will be: root and the password will be whatever you specified during the wizard. When logged in, click the configuration page. This is the only page you have to make and changes on.

From the whole installation this is the area where the most gotcha’s are, and where during my testing I ran into the most issues, which in most cases turned into complete rebuilds.

The gotcha’s here are the following. Make sure you use the FQDN for the DB host.  Then use the SQL
login you setup for the VRMS_DB. In our case we used the SA account.

The VRM in most cases is pre-populated. If it is not, click browse and it will be there.  Using the
IP is fine here.

Second gotcha here is the vCenter Server Address. You will see that it is prepopulated with the vCenter IP-address. Do not leave it like that! If you do, you will have problems later on and will have to rebuild.

So enter the FQDN of the vCenter Server, and the Admin e-mail address. No need to do anything with the SSL certificates.

On the right under actions, click “Save and Restart Service”

This will take a little bit, you will get a certificate warning, click accept and wait. If everything is configured correctly you will see the following message.

If you do not, you will have to go back and find out what you misconfigured. Until this is correctly setup you will not be able to proceed.

The hardest part has now been completed, at this point we can go ahead and deploy the VR Servers, these are the servers that will actually do the replication on the VM’s.

Click the link and the deployment wizard will start up again.

Same as on the VRM server wizard, make sure to change the Name on the VR servers. In our test environment they are called PROD-VC-VRS and DR-VC-VRS.

On the properties page, make sure to enter the IP-addresses and do not use DHCP. Let the VM’s deploy.

After the VM has been deployed, wait 2 or 3 minutes. During tests I have noticed that after the VM has been deployed a few processes are still running.

Now we can register the VR servers with vCenter. Click the link, and pick the VR server you just deployed. And finish the wizard.

We can now do the same thing on the DR site. Deploy the VRM server, configure it. Deploy the VR server and register it with vCenter.

Next we need to configure the connection between the VRMS servers. Click the link and a wizard will open. It will ask you if you want to configure the connection, click “Yes”. Enter the vCenter credentials for the DR site. Accept the certificate and the connection is being configured.

Your SRM environment should look like this:

We now have successfully configured the vSphere Replication environment within SRM.

At this point we can go ahead and setup replication for any VM.  This can simply be done by right clicking any VM under “Hosts and Clusters” on the “Home” screen, and clicking “vSphere Replication”

A wizard will open and walk you through the settings that are needed to setup replication. As there are no gotchas in this process I will not go through it.

Once replication has been setup, you can start protecting the VM with SRM.

Tagged with: , , ,
Posted in SRM
37 comments on “SRM 5 vSphere Replication – how to install and configure
  1. Deploying vSphere Replication…

    vSphere Replication is a replication engine that is part of SRM 5.0 and requires ESXi 5.0 and later, giving an alternative means of protecting and replicating virtual machines between sites. It is entirely managed within the SRM interface after initial…

  2. Hello Fred!

    I am building an SRM5 environment right now, but unfortunately I have run into an error message. When I tried to register the VR server I got a “TCP connection to server at ‘172.19.13.23:8123’ failed.” The network connection is OK, I checked it.

    I’ve read this article, because I was curious about one thing: the evaluation guide says that the first VR server has to be deployed FROM the Protected Site to the Recovery Site. I was suspicious that maybe that would be the source of my problem, because I could not do it. The reason I couldn’t is that I don’t use vCenters in Linked Mode, so I can only select the actual site’s ESXis during the VR deployment.

    Anyway, it turned out (from your article) that you either doesn’t deployed as the Evaluation Guide said, although your SRM5 is up and running.

    Is there any chance that you have seen the same error message while you were working on the environment?

    • Hi Attila,

      I have seen errors like this but I am not sure about that exact one though.
      It might sound odd, but most likely the error comes from somewhere using an IP address instead of the FQDN. You might think that both should work fine, but all the errors that I have seen came from that.
      I have tried to fix these problems, but always ended up just rebuilding.

      In my test lab, I do not have my vCetners in Linked Mode, so I just deployed my protected site VR and then went to the Recovery VC and did the same thing there.

      Good luck, hope this helps.

  3. Hi Fred!

    Thank you for your reply. I am going to check FQDN/IP problem. I will come back to you if I figure something out. (In case you are interested in it at all.)

    Thanks,
    Attila

    • Attila,
      Were you able to find the problem?

      Fred

      • Yes, I finished the SRM 5 environment yesterday. Thank you for your hint, that was the solution. Actually there were two problems:
        1) the DNS wasn’t allowed on the firewall for one of the SRM servers.
        2) I used IP addresses everywhere. (I wanted to eliminate a problem that a misconfigured DNS communication could cause, this is why I used IP everywhere instead of FQDN.)

        So I checked the DNS resolution on each VM, and I found that one of the VM’s was misconfigured on the firewall. The second thing, I built the VRMS connection again, but that time I used FQDN as you advised.

        Thank you very much for your help!

  4. Ferdinand says:

    I found the info on this blog beneficial.

  5. paul says:

    HI Fred,

    Great post, I’m wondering – why cant SQL Express be used if you want to host vcenter and srm on the same server?

    • Paul,
      After doing some research, this is what I found:
      SQL Express 2008 R2 64-bit can be used for vCenter and SRM.

      The 32bit R2 and regular 2008 Express (non R2) are not supported.
      vCenter Update Manager will not run on Express (any version).

      The biggest reason I did not use it was because of my lack of knowledge of the R2 Express editions. In the past there really was no Management tools for it, except for the full SQL admin tools. Now the R2 there are a few flavors that include the admin tools (according to our DBA).

      I guess next time I rebuild my lab, I will try out the SQL Express 64bit edition with the included Management tools.

      Thanks for the comment!

      Fred

  6. I used the freebie version that vCenter Server 5 automatically installs as part of installing vCenter. But, thank heavens we have a SQL dude on staff here as it turned out you had to ‘enable’ TCP/IP for port 1433. Honestly, I would’ve never looked for something like that (I can’t even figure out why the installer didn’t enable anyway, innit that a no-brainer? then again, vCenter worked perfectly fine without the port enabled so.. *shrug*) Anyway, he could tell port 1433 wasn’t open, so we kept trying to figure out why. Firewall was turned off, antivirus was turned off, *finally*, we looked at this util that enables / disables the allowed types of connections. Anyway, down-n-dirty is, if someone else runs into this:

    Open the ‘SQL Server Configuration Manager’.

    Expand ‘SQL Server 2005 Network Configuration’.

    Click on ‘Protocols for SQLEXP_VIM’ (‘SQLEXP_VIM’ was the name that vCenter’s auto-installer called the instance of SQL).

    Double click on ‘TCP/IP’.

    Click the ‘IP Addresses’ tab.

    There will be blocks with IP addresses (one for IP4, one for IP6, one for loopback and who knows what some of the others were). Make sure the block that shows your server’s IP4 address says ‘Enabled | YES’.

    Scroll to the very bottom and under ‘IP ALL’, type 1433 next to ‘TCP Port’ if it’s not there (wasn’t on either of my vCenter servers).

    Click ‘Ok’.

    Restart SQL (and probably a bunch of VMware services that quit because SQL restarted so be sure to restart those too or, if you *can* reboot instead, reboot as that’s probably easier).

    Fred, your directions have been really truly helpful. Installing vSphere Replication has been a fight every step of the way and I don’t know that I could have gotten nearly as far as I have without this web page. Thank you, thank you, thank you!

  7. paul says:

    Thanks for the reply Fred, was worried there for a minute 😉

    finally got it working in my lab. Nobody saved the day, I had the same prob with tcpip – crazy that you have to go in and configure this!! but for anyone else, use netstat to check tcp/1433 is listening.. the IP ALL didnt have the tcp port configured, once I configured that, restarted services the server was listening on 1433 and low and behold vRMS config worked.

    Thanks guys.

  8. SpringCoder says:

    Hi, I am using an eval version of SRM and wanted some pointers.
    So I have set up vCenter DB as a separate instance, SRM DB as a separate instance.
    Now I want to know whether the
    1. vrms DB needs to be necessarily located in one of the vCenter or SRM instances
    2. can it have its own instance and use a DB inside it.
    3. can it be collocated with one of the vCenter or SRM.

    I know these are all different scenarios, I wanted to know which according to you might be a supported case. My question comes from the thought that vsrm needs access to either the vcenter or the srm database to carry out the operations. Hence the 3 different options.
    Thanks for the article it really helped a lot.

    • It is not needed to create separate SQL instances for the databases. (unless you have a specific need for it) you can put all three databases in the same instance or one in one instance and two in the other. Any way you want to do it, it will work. You can even have multiple SQL servers for each database. 🙂

      As long as vCenter can talk to SRM and the other way around, and they can talk to their databases then you will be fine. Of course the less complexity the better it is in case you need to troubleshoot.

      In my test lab I have the SQL server running on the same VM as where vCenter and SRM are installed. SQL runs with one instance in which all three databases are located.

      Hope this helps.
      Fred

      • SpringCoder says:

        Hey Fred,
        Really thanks to you and the other comments on this blog I have managed to set up SRM as well as configure protection. As of now my experience with SRM installation hasnt been smooth. Whats more, the test/recovery has never worked as yet. The recovery plan when executed fails with ‘VR synchronization error’ I wonder if you have come across this.

        Maybe the reason I am having such error is due to the setup environment. As something that might also be useful to others I will describe it here.

        To test SRM, I used a 16GB ram machine with VMware workstation installed on it. Created 4 VMs, 2 ESXi and 2 Servers. Installed vCenter on two servers. Along with their databases. Followed all the steps as mentioned in the blog and other comments like different names for VR servers, opening port 1433. The setup gets installed.

        However the connection between the VRMS and the VR server keeps failing. I wonder if this is due to the VMware workstation.

        Everytime I run the recovery plan in migration or test, the VMs part of the plan get into some error mode and are not displayed in any more protection groups.

        Other times I keep getting the error, Local VRMS server must be connected.

        There definitely seem to be gaps in the product, I hope they are fixed by RTM. I wonder if you have come across such errors before and whether you have some workarounds for them.

      • I do not think that SRM is the problem here. If anything I think it would be vmware workstation. I tested it both on my DELL Precision M6500 with 16Gb and on phyisical hardware with no problems.
        Let me ask you a question. You said you have 4 VM’s running under workstation. 2 ESXi, and the servers, prod VC and DR VC.
        What do you have running on your ESXi servers that you are failing over? Also, did you let the replication finish completely of the VM that you are trying to fail over?
        I will check on a few things and get back with you. Im leaving today for a weeks vacation so it will be a little bit before I can get back with you.
        Please reply with your answers, hopefully we can find the problem together.
        Fred

  9. When I open your RSS feed it puts up a whole lot of strange characters, is the deal on my end?
    Heart Healthy Diet

  10. Neil Warren says:

    I found your website perfect for my needs. It helped me, and I’ll certainly install what you recommend. You have something good going here, keep it up!

  11. […] If you are looking for a more indepth guide on how to deploy it try Fred van Donks guide here.  https://fvandonk.wordpress.com/2011/11/10/srm-5-vsphere-replication-how-to-install-and-configure/ […]

  12. Rob says:

    Excellent post, this guide was very helpful for me. Just wanted to throw out there that as you mentioned in one of the comments, SQL Express 2008 R2 64-bit does work for all of the databases needed for vCenter, SRM and VRMS. I am also using it for Update Manager and have not run into any issues. And make sure that the VRMS_DB is using the default instance for SQL (MSSQLSERVER). If you don’t use the default instance you will not be able to configure the VRMS. Thanks again though for a valuable resource here.

  13. […] If you are looking for a more in depth guide on how to deploy it try Fred van Donks guide here.  https://fvandonk.wordpress.com/2011/11/10/srm-5-vsphere-replication-how-to-install-and-configure/ […]

  14. SCX says:

    Nice work. A couple of comments:

    It is not necessary to use a default instance of SQL, but it may be simpler to do so.
    The post about the IP port 1433 is important – that one stumped be for a few hours.

    You mention that using FQDN is necessary, but I used IPs and installed without problems – do you have examples of specific problems not using FQDN may cause?

    Also, you didn’t mention configuring the VRS itself (PROD-VC-DRS in your case). If you click on this in vSphere client , you will see a “Configure VR Server” link to the right.
    I mention this because I have not been able to actually connect via the web interface to a VRS (although no problems connecting to the VRMS). However, replication seems fine, so I do not know exactly what you need (if anything) to configure in the VRS itself – maybe it’s by design that you shouldn’t be able to configure directly, who knows?

    From my experience, It does seem that a lot of people are being used as “beta testers” for SRM – the product just does not seem polished or stable enough for prime time yet, and there are so many “gotchas” doing the install that I almost gave up in disgust.

    Hopefully the next version will be better!

    • The problem with not using FQDN’s I ran into was with the DB host configuration while setting up the VRMS. If I used the IP address it would fail.
      But just as a general comment I would always suggest to use FQDN’s.

      Regarding the VRS’s, there is no need to do any configuration on them. Looks a bit strange, I agree.

      I have worked with SRM since the first version and back then I agree it was not very good.
      Version 4 and now 5 are way better and no where anywhere from beta anymore.
      I have run SRM for many years in productions and especially SRM 5 is ready for prime time (as is SRM4)
      I do agree, they should have done more testing to iron out the ‘gotchas’, but once you have those figured out it is smooth sailing.
      Hence the reason for me posting this post. 🙂

    • Jase says:

      SCX: You say “It is not necessary to use a defualt instance”? Are you sure? What is the syntax and on what field in the VRMS DB config dialogue? I can get default instance but named instance does not work. Help..

  15. Cyril says:

    Hi Fred,
    Thank you for the article, very handy. Question though. We installed the replication servers on vsphere 4.1 with SRM 5 and of course the virtual hardware/tools is 7. Now that we have migrated to vSphere5, we can’t find a way to upgrade the virtual hardware/tools to 8 on the SUSE based replication servers. Any ideas?

    cyril

    • Cyril,
      It has been a while since I worked on this post. But I think you should be able to setup more replication servers and just deploy those to vSphere5 hosts.
      Fred

  16. nina says:

    VERY helpful site – thank you so much for the pointers 🙂

  17. josuevx says:

    thanks for sharing. nice article!

  18. Arshad says:

    Dear Fred Good Day,

    I am new in Vmware stuff,Please let me know we have to install 2 vm centers and 2 srm on 2 diffrent phyical machines.and one quick response from yr side what is diffrence between SRM vsphere replication and array based replication which one is best.does SRM Vsphere replication take care of full protection and recovery as done by array based SRM.

  19. Michael says:

    Thanks for sharing…….Great stuff!

  20. Durga says:

    Hi ,

    To set up replication on 25 vm’s how many ip’s are required to set up replication at vcenter level.

    Durga

    • I assume that you want to use vSphere Replication and not array based replication. If that is the case you should be able to use a single replication VM on each site. So two IP-addresses total.
      But if the IOPs of those 25 VMs is really high you might have to add more Replicator VMs which will than increase the amount of IPs needed.

  21. Basavaraj R Navalgund says:

    Hi Fred,

    Still now,It is best learning post for configuring SRM database and SRM related stuffs.

    Regards
    Basavaraj.R Navalgund

Leave a reply to SpringCoder Cancel reply