Configuring Backup Pool when the Primary Pool is Hosting the Central Management Store

I was testing out the new paired pool functionality in Lync Server 2013 in my lab when I ran into an interesting issue.  You can find more information about paired pools in the Planning for Front End Pool Pairing TechNet article.  After selecting the backup pool for my primary pool in Topology Builder, when I went to publish the topology, I got the following error:

Error: Script failed when installing "CentralMgmtStore" on "BETA-LS15-SE1.beta.deitterick.com\rtc". For details, see the following log file: "C:\Users\Administrator.BETA\AppData\Local\Temp\Create-CentralMgmtStore-BETA-LS15-SE1.beta.deitterick.com_rtc-[2012_08_01][12_13_34].log"

Looking at the log file mentioned in the error message: 

****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.XdsDatabase'****
Initializing DbSetupBase
Parsing parameters...
Found Parameter: SqlServer Value BETA-LS15-SE1.beta.deitterick.com\rtc.
Found Parameter: SqlFilePath Value C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup.
Found Parameter: Publisheracct Value BETA\RTCUniversalServerAdmins;RTC Local Administrators.
Found Parameter: Replicatoracct Value BETA\RTCUniversalConfigReplicator;RTC Local Config Replicator.
Found Parameter: Consumeracct Value BETA\RTCUniversalReadOnlyAdmins;RTC Local Read-only Administrators.
Found Parameter: Role Value master.
Trying to connect to Sql Server BETA-LS15-SE1.beta.deitterick.com\rtc. using windows authentication...
Sql version: Major: 11, Minor: 0, Build 2100.
Sql version is acceptable.
Validating parameters...
DbName xds validated.
SqlFilePath C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup validated.
DbFileBase xds validated.
DbPath is not specified, using default.
Default DB Path not found. Trying Master DB Path.
Default DB Path is c:\Program Files\Microsoft SQL Server\MSSQL11.RTC\MSSQL\DATA.
DbPath c:\Program Files\Microsoft SQL Server\MSSQL11.RTC\MSSQL\DATA validated.
Effective database Path: \\BETA-LS15-SE1.beta.deitterick.com\c$\Program Files\Microsoft SQL Server\MSSQL11.RTC\MSSQL\DATA.
LogPath is not specified, using default.
Default Log Path not found. Trying Master DB Path.
Default Log Path is c:\Program Files\Microsoft SQL Server\MSSQL11.RTC\MSSQL\DATA.
LogPath c:\Program Files\Microsoft SQL Server\MSSQL11.RTC\MSSQL\DATA validated.
Effective Log Path: \\BETA-LS15-SE1.beta.deitterick.com\c$\Program Files\Microsoft SQL Server\MSSQL11.RTC\MSSQL\DATA.
Setting security for database xds.
Can not update database xds since the database state is not up to date. Current database state is DbState_DoesNotExist.

You can see that the xds database doesn't exist.  Unfortunately Topology Builder doesn't create the database for you.  The backup pool I was selecting was already installed and running, so this database didn't exist on that server.  So in order to fix this issue, you will need to run the following PowerShell cmdlet:

Install-CsDatabase -CentralManagementDatabase -SQLServerFQDN <FQDN of your SQL Server> -SQLInstanceName <name of instance>

This will create a blank xds database on the backup pool.  This is the same cmdlet that you would run if you were following the steps to move the CMS to another pool.  After the database is created, you can go ahead and publish the topology again.  This time it will complete successfully and you will have configured paired pools in Lync Server 2013.