Thursday, April 11, 2013

Move-CsManagementServer failed

During a migration from Lync Server 2010 to Lync Server 2013 there is a point where you need to move the CMS database to a new Lync Server 2013.
In this case all Lync related data was installed on a D:\ drive as a requirement from the customer.
When installing the CMS database you need to use powershell to set the correct location to folder on the D:\ drive. 
After this step I started the Move-CsManagementServer and this failed during the bootstrapper.exe step with an error.

Error: An error occurred: "Microsoft.Rtc.Management.Deployment.DeploymentException" "Cannot find any suitable disks for database files. You must manually specify database paths."

The cause of this error was lack of free disk space on the C:\ drive. You still need 20 GB of free disk space on the system drive. After expanding the system drive lets run the Move-CsManagementServer again.....(no success)...and again with the Force switch.

PS C:\> Move-CsManagementServer -force

Confirm
This cmdlet moves Central Management Server to the pool that contains this
computer.

 Current State:
 Central Management Server Pool: "srvlync2013.contoso.com"
 Central Management File Store: "\\srvlync2013.contoso.com\LyncShare$"
 Central Management Store: "srvlync2013.contoso.com\rtc"
 Central Management Store SCP: "srvlync2010.contoso.com\rtc"

 Proposed State:
 Central Management Server Pool: "srvlync2013.contoso.com"
 Central Management File Store: "\\srvlync2013.contoso.com\LyncShare$"
 Central Management Store: "srvlync2013.contoso.com\rtc"
 Central Management Store SCP: "srvlync2013.contoso.com\rtc"

The last attempt to move the Central Management Server from
"srvlync2010.contoso.com\rtc" to "srvlync2013.contoso.com\rtc" either
failed or is in progress. Ensure that there is no other move operation in
progress and run this cmdlet with the -Force flag to retry the move to
"srvlync2013.contoso.com\rtc".

Note:
As you can read the CMS is correctly moved to the new Lync 2013 server but the SCP is still pointing to the old Lync 2010 server. When the Master Replication service and the File Transfer Agent service are starting they read out the SCP and they stop running because both services try to connect to a server with an incorrect database version.

The move is still failing with an error:

Move-CsManagementServer : Export configuration data failed. Exception Details:
Exception : System.Data.SqlClient.SqlException (0x80131904): Could not find
stored procedure 'dbo.XdsBackupAllItems'.

At this point Lync is still running without any problems. It is even possible to access the Topology Builder and download a configuration. But replication of the config to other servers is not working. To solve this error I created a backup from the XdsConfig and LisConfig database with Export-CsConfiguration and with Export-CsLisConfiguration cmdlets. 

Now again I started to move the CMS with Move-CsManagementServer -ConfigurationFileName "C:\CsConfiguration.zip" -LisConfigurationFileName "C:\CsLisConfiguration.zip" -Force

A Voila ...... a working system is the result!!!

9 comments:

  1. You saved my weekend! Thanks for your good article.

    ReplyDelete
  2. Jakob KvistgaardMay 14, 2013 at 10:23 PM

    THANK YOU!!! Your solution worked perfectly :)

    ReplyDelete
  3. It worked like a charm! Thank you so much!

    ReplyDelete
  4. Hi, Frederik or someone else, how to create backup from the XdsConfig and LisConfig database with Export-CsConfiguration and with
    Export-CsLisConfiguration cmdlets.

    thanks

    ReplyDelete
    Replies
    1. Hi, what do you mean? Do you need the correct syntax for exporting the configuration?
      Export-CsConfiguration -Filename c:\temp\csconfig.zip
      Export-LisConfiguration -Filename c:\temp\lisconfig.zip

      Frederik

      Delete
    2. yes I know the correct syntax but when I execute above command
      (export-csconfiguration) I get the following error
      Export-CsConfiguration : Could not find stored procedure
      'dbo.XdsBackupAllItems'.

      + CategoryInfo : NotSpecified: (:) [Export-CsConfiguration], SqlE
      xception
      + FullyQualifiedErrorId : System.Data.SqlClient.SqlException,Microsoft.Rtc
      .Management.Xds.ExportConfigurationCmdlet

      Delete
  5. Hi, I ran into the same problem, however the solution was simpler.
    After adding disk space I reran the bootstrapper on the Lync 2013 CMS server, and this time the updated completed successfully. It was still not possible to publish the topology because the SCP was pointing to Lync 2010 but this can be moved using Set-CsConfigurationStoreLocation. It was then possible to publish the topology. The stopped services then started fine. It is also necessary to run bootstrapper on the Lync 2010 machine to remove the unused components. As best practice I run bootstrapper on all Lync servers. Then uninstall the CMS on Lync 2010

    ReplyDelete
    Replies
    1. Hi, it's good to know that this do the trick. I can remember if I did try to ran the boots trapper multiple times without success.

      Delete