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.
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”.
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.
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.
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.
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.