Ewan, a Lync guru, PFE colleague and all round top bloke, and I were teaching a Lync course this week and during our Lync lab sessions we hit some issues installing Lync on a bunch of Front End Servers. I have installed Lync a lot of times in the past 6 months and I had never hit this issue so I thought it would be worthwhile documenting for those exceptional times when others might too hit this snag.
In our lab environment, we were installing Lync on virtual machines using a Lync RTM .ISO mounted as a DVD on the virtual machine.
During the "Install Local Configuration Store" step of the Lync installation, the setup.exe would fail attempting to install SQL Server Express that would be used to store the local copy of the CMS database.
Attempting a re-install would also fail. Rebooting the server and attempting another re-install would also fail. The account installing Lync had all the necessary rights (Domain Admins/Enterprise Admins/Schema Admins/CSAdministrator) so no problems with privileges.
We could consistently produce this problem on the affected server. Strangely we started to then get the same installation problem on other virtual machines in the lab, on the same virtual host machine, using the same mounted Lync RTM .ISO file.
Manual installation of SQL Express
The error in the Lync installation log showed the command that was being executed at the time of the error. The information in the log told us what was taking place but didn't provide enough detail about what was the cause.
The next step was to try running the below command that was listed in the installation log to see if we could get more detailed information about what was failing. The next logical step was to fire up the command executed by the install in order to dig deeper. Listed here is the command executed with the exception of the options in bold (which suppressed visible output):
C:\ProgramData\Microsoft\Lync Server\Deployment\cache\4.0.7577.0\SQLEXPR_x64.exe /Q /HIDECONSOLE /ACTION=Install /FEATURES=SQLEngine,Tools /INSTANCENAME=RTCLOCAL /TCPENABLED=1 /SQLSVCACCOUNT="NT AUTHORITY\NetworkService" /SQLSYSADMINACCOUNTS="Builtin\Administrators" /BROWSERSVCSTARTUPTYPE="Automatic" /AGTSVCACCOUNT="NT AUTHORITY\NetworkService" /SQLSVCSTARTUPTYPE=Automatic
Running the SQLEXPR_x64.exe manually produced the following error. The plot thickened and we had the main cause for our issue, the SQLExpr_x64.exe on the installation CD was corrupt. Hence, the real culprit was a corrupted .ISO file. We had been using the same .ISO on each of the virtual machines on the host (hence why the problem was occurring on each of the Lync virtual machines), and on a number of hosts in the classroom.
Mounting a new .ISO
Well to fix the problem should simply be just a case of mounting a known good Lync installation .ISO and off we go right? Actually no that is not the case. You may have noticed that the SQLExpr_x64.exe that was corrupted, was residing in the "C:\ProgramData\Microsoft\Lync Server" directory (a normally hidden operating system directory). So why did that mean the .ISO was broken or corrupt?
When the Lync installation takes place, a number of files are copied to the C: drive to enable file expansion and then executed to complete the installation. So when subsequent installations are performed, the same files are not copied off the DVD again as the cached copies are already in place. So simply mounting a good .ISO would not get around the problem. Deleting the affected SQL Express file from the C:\ProgramData folder and then using a known good Lync installation .ISO did the trick!
For your information the picture below lists the cache installation files copied to the ProgramData folder.
I hope this article helps others who may hit this issue (with any luck no one else will).
PS. Lync Rocks!