Last week I had a nice email exchange with Ben Meadowcroft who is the Product Manager for VMware's Site Recovery Manager. While chatting with Ben, I learned about new feature that I was not aware of in the latest SRM 5.8 release which now supports an embedded vPostgres database. Not only does this greatly simplify the installation and not requiring an external database like Microsoft SQL or Oracle, it is also on par in terms scalability with the external databases which is great for customers. I definitely like this improvement in the SRM installation and making it easier to evaluate and POC without requiring a large resource footprint.
UPDATE (11/09/15) - For silent installation of SRM 6.x, please take a look at this article here as some of the install params have changed.
In addition to new database feature, I also learned that SRM supports a silent mode installation which I was not aware of before either. I figured this might come in handy for those needing to automate an SRM deployment given you will need at least two installation: one for the protection site and one for the recovery site. I did not see much documentation on this topic and it has been awhile since I have played with SRM, I thought this would be a good opportunity for some automation goodness as well as checking out some of the new SRM 5.8 features including VSAN support as well as the new vSphere Web Client integration.
In my lab, I wanted to run the a minimal setup and the least amount of Windows 🙂 With that, I was able to use two VCSA, 2 SRM hosts running on Windows 2008 R2 and six Nested ESXi hosts as shown in the diagram below:
To perform a silent installation of SRM, you need to specify a list of 35 parameters to the actual executable which is quite daunting and can also be quite error prone. It actually took me a few tries before I was able to get it working and I wanted to make easier so that anyone can just consume it. I decided to create a simple Windows batch script called install_srm.bat which wraps all the required parameters in a set of variables that can easily be modified by anyone. Out of the 35, only 31 of the parameters can be edited and of those only 15 is really required to be tweaked (which is clearly noted in the script) but also shown below:
- SRM_INSTALLER - The full path to the SRM 5.8 installer
- DR_TXT_VCHOSTNAME - vCenter Server IP/Hostname
- DR_TXT_VCUSR - vCenter Server Username
- DR_TXT_VCPWD - vCenter Server Password
- VC_CERTIFICATE_THUMBPRINT - vCenter Server SSL SHA1 Thumbprint
- DR_TXT_LSN - SRM Local Site Name
- DR_TXT_ADMINEMAIL - SRM Admin Email Address
- DR_CB_HOSTNAME_IP - SRM Server IP/Hostname
- DR_TXT_CERTPWD - SSL Certificate Password
- DR_TXT_CERTORG - SSL Certificate Organization Name
- DR_TXT_CERTORGUNIT - SSL Certification Organization Unit Name
- DR_EMBEDDED_DB_DSN - SRM DB DSN Name
- DR_EMBEDDED_DB_USER - SRM DB Username
- DR_EMBEDDED_DB_PWD - SRM DB Password
- DR_SERVICE_ACCOUNT_NAME - Windows System Account to run SRM Service
Note: To retrieve the vCenter Server SSL Certificate Thumbprint, you can either view the details using a regular web browser as shown in the screenshot below
or you can run the following command on a UNIX/Linux using the openssl utility to extract the thumbprint:
echo -n | openssl s_client -connect [VC-IP-ADDRESS]:443 2>/dev/null | openssl x509 -noout -fingerprint -sha1
Depending on the number of SRM installations you require, you will need to modify the script to perform those additional deployments. As you can see below, I have my two SRM sites implemented. I have also gone ahead and paired both my SRM setups as well as deploy and configure the vSphere Replication 5.8 using the vSphere Web Client. I definitely recommend checking out the latest SRM 5.8 release if you have not already and you may also want to consider using the embedded vPostgres database for future SRM installation to help simplify the deployment and management of SRM.
For those of you who are interested in the variable mappings to the SRM UI installer (which is pretty straight forward), I took screenshots of each step and mapped them for your convenience.
Ken Gardner says
Thanks for this William! I've attempted to modify your script for SRM 6.1 and obviously there is some differences. The farthest I've gotten thus far is for the script to run and the embedded Postgres db and its service get installed. The log states the install was unsuccessful with a 1603 error code and few errors along the way. Most notably one that states that mandatory fields cannot be blank. So, my best guess is that some of the variables are incorrect. Do those follow a specific naming, based on the input lines in the different windows?
John says
I Managed to get it to work. check these variables:
NEW:
PLATFORM_SERVICE_CONTROLLER_THUMBPRINT=
PLATFORM_SERVICE_CONTROLLER_HOST=
PLATFORM_SERVICE_CONTROLLER_PORT=443
SSO_ADMIN_USER=
SSO_ADMIN_PASSWORD=
DR_TXT_HTTPS_PORT=9086
Removed:
DR_TXT_VCPORT
DR_TXT_VCUSR
DR_TXT_PORT
DR_TXT_HTTPPORT
DR_TXT_API_SOAPPORT
DR_ACCEPT_THUMBPRINT
Then modify the %SRM_INSTALLER% row with the new and removed settings.
I think that is it.
Ken Gardner says
Thanks John! I used your new variables and omitted the others but I am still not able to get SRM to fully install. I can get the Postgres service and database to install, but that's still about it.
Would you mind providing what you used in your %SRM_INSTALLER% row? I'm wondering maybe if I'm still using a variable that I do not see to or one that is out of place.
William Lam says
Ken,
As John mentioned, there are a few new variables that have been introduced with both SRM 6.0/6.1 to support the Platform Services Controller which is new with vSphere 6.0. I too have come to same conclusion on the added variables, however I'm surprised to see that removing DR_ACCEPT_THUMBPRINT worked as this shouldn't be the case as you probably want it to accept the Thumbprint else the installer would hang, at least that's the case in the UI.
I tried updating my script to take into account the new variables and when trying to set this up myself (Win 2012), I'm also getting 1603 error which is actually a generic error code. You'll need to step through the logs which should eventually lead you to the reason for the failure. From what I see in my env, it hits "Srm::Installation::CisRegistration::ValidateVc: ERROR: Failed to retrieve VC Node ID. The map is empty" which seems to be an issue parsing out the VC Node ID which in my logs is extracted but perhaps something else is going on.
It would be good to see if you're seeing same error or something different. Also another thing I ran into initially which was kind of dumb is that we require the SSL Thumbprint to be all CAPS, apparently it is case-sensitive so that was my original error then once I fixed that, I ran into this one. I'm still awaiting a response internally but I would highly recommend you file an SR so this can be tracked
Ken Gardner says
Thanks for the reply William! I too get the 1603 error as well. Let me double check the log on the VCNodeID error....I was parsing through the log with trace32 and there are a handful errors, but nothing that is a sore thumb.
William Lam says
I've just published a new article covering silent installation of SRM 6.x here http://www.virtuallyghetto.com/2015/11/automating-the-silent-installation-of-site-recovery-manager-6-06-1-wembedded-vpostgres-db.html There were a couple of minor changes and after speaking with SRM Engineering, I was able to get it working and thought I share the updated script