Tuesday, January 6. 2009

If you setup your OCS 2007 R1 using the Configuration container during Forest Prep, congratulations! You can skip this blog post entirely.

However, if you are migrating from LCS 2005 SP1 or OCS 2007 R1 using the default settings, read on.

Although it is marked as "optional" before upgrading to OCS 2007 R2, it is highly recommended to migrate the global settings to the Configuration container for a few important reasons.

The primary reason, at least from my standpoint, is that if you upgrade your Active Directory schema to OCS 2007 R2 before moving the global settings container contents to the configuration partition, you can no longer use the MigrateOCS.vbs script. You will be "stuck" with those settings moving forward.

The other reasons are primarily performance related, which the documentation for OCS 2007 R2 goes over.

To quote a section of the documentation:

In previous versions of Office Communications Server, the default container was the root domain System container. Although storing global settings in the System container has advantages, such as faster replication and fewer replicated copies, in centralized topologies, this approach might not perform as well in geographically distributed topologies if root domain availability is insufficient. It can also cause long service start time or long replication delays when you manage global settings.

The actual documentation for MigrateOCS.vbs can be, honestly, a little confusing. I used the LCSCMD.EXE from OCS 2007 R1 to make sure that I wouldn't accidentally put R2 specific entries into Active Directory.

Before performing the actual deletion of the RTC Service tree from the System container of Active Directory (step #7 - "DeleteSystemGlobalSettingsTree"), I took a snapshot of the LDAP entries in DN:

CN=RTC Service,CN=Microsoft,CN=System,DC=tiensivu,DC=local

The command I used was ldifde -f SystemContainerBackup.LDF -d "CN=RTC Service,CN=Microsoft,CN=System,DC=tiensivu,DC=local

Of course, replace tiensivu and local with your actual domain information.

I also took a backup of the OCS setup into an XML file using:lcscmd.exe /config /action:export /level:global,machine,pool /configfile:OCSBackup.xml /poolname:Tiensivu

Why did I do this? The MigrateOCS script does not provide a back out procedure. If things really went south, I wanted a tangible way to restore my environment.

Noteworthy gotcha for OCS 2007 R1 mediation servers: If you attempt to test IM and web conferencing at step #6, to verify that the script worked properly, you will notice that your mediation servers will refuse to start up. They complained of duplicate entries in Active Directory. Strangely, the Front End servers and other server roles did not complain. Once step #7 completed, the mediation servers fired right up.

Noteworthy for LCS 2005 migrations: If you attempt to do step #3 (ForestPrep) for LCS 2005 SP1 without KB 911996 installed on the server, you will receive "Parameter is incorrect" errors from LCSCMD.EXE because pre-KB 911996 versions did not support storage in the Configuration partition. In addition to the ForestPrep, you also need to do a DomainPrep. This is not required for OCS 2007 R1. Confused yet? It had my head swimming too.

I also highly recommend running the script in "/verbose" mode so that you see all the progress of each step. It might seem overly chatty but it gives you a good idea of the overall process and how well things are replicating.

Hey Aaron, thanks for the helpful blog post. We just performed a migration of our Office Communications Server 2007 R1 deployment and I'd like to share our experience. We followed your advice and backed up our settings using the commands you provided, then moved on to the migrateocs.vbs script. When we initially tried to perform step 1 from migrateocs.vbs, we added the /Check switch, which returned OBJECT-NOTFOUND and PARENT-NOTFOUND results and the test was reported as unsuccessful. We assumed the standpoint that the script was going to check the System container against the Configuration container and then validate that the System tree contents were ready to be moved. This is the wrong standpoint to work from. When you run step 1 with the /Check switch, the script only checks if the values already exist in the Configuration container or not. If the values do not exist, you will get the result that we did. Once we performed step 1 without the /Check switch the result was successful. All the other steps were successful as well. Just thought that our experience might be helpful for others in the same situation.

On the migration of the containers, if i only did the OCS 2007 preps and never installed any servers do i need to run the step 4 (Update the Office Communications Server distinguished name references to the global settings tree) and step 5 (Update the Office Communications Server users/contact/inetOrgPerson’s msRTCSIP-PrimaryHomeServer distinguished name references) or can i just continue to the delete step?