Friday, March 7, 2014

Upgrading to Windows Server 2012 R2 from 2012 RTM Running SharePoint 2013

These are some of my own notes on upgrading Sharepoint Server 2013 from the server running Windows Server 2012 to Windows Server 2012 R2. I know this will help others that made the same mistakes that I did. I'm grateful to have the ability to assist others in their projects. In addition to helping my clients achieve their goals, I am able to learn new skills along the way which then I am able to share with others. Knowledge truly is power. Today's blog post is information about a mistake I made while working on a client's server, as well as how to fix the problem.

My client's request was simple; they wanted to upgrade all of their servers from Windows Server 2012 to Windows Server 2012 R2. They had one server running SQL Server 2012 RTM, one virtual machine running Sharepoint Server 2013 RTM, then a handful of some other virtual servers running Windows Server 2012. They have a single hardware server running Windows Server 2012 RTM and all of their workloads run in Hyper-V virtual machines on this physical server. Backups are properly configured.

I will continue with describing my mistake:

  • On the SQL Server 2012 virtual machine, I captured a VM snapshot, attached the 2012 R2 ISO to the virtual machine settings, executed setup.exe from the disk, then started the upgrade.
  • On the Sharepoint Server 2013 server, I attached the 2012 R2 ISO to the virtual machine settings, executed setup.exe from the disk, then started the upgrade.

So first off, there is one very important mistake I made -- I did NOT do any research on application compatibility for SQL Server 2012 for Server 2012 R2, or for Sharepoint 2013 running on Windows Server 2012 R2 either. If I knew the requirements before the upgrade, I would have made sure  The 2nd mistake I made was NOT taking a snapshot of the Sharepoint server.

When both servers started back up after the 2012 R2 upgrade, I was able to log in to each of them just fine so the OS portion was good. But both SQL Server 2012 had tons of errors and Sharepoint 2013 wouldn't display any web pages and displayed nothing but HTTP 500 errors. Shoot, what was I to do? Damage control mode. I was left with unusable SQL database and a broken Sharepoint server. Not good.

First things first, I reverted back to the saved snapshot for the SQL Server. Once that was done and after I confirmed the SQL server was back in good operating condition it was time to focus on Sharepoint 2013.

After several hours of trying several things, here was our fix:

  • Install SharePoint Server 2013 Service Pack 1, then reboot.
  • Run the SharePoint Product Configuration Wizard to finish the upgrade. Reboot when prompted.
  • Verify SharePoint sites come up without a problem.

The environment was finally back up and running with no more errors. From this point we made snapshots of each virtual machine then continued to perform the 2012 R2 in-place OS upgrades.

If you want to perform an in-place upgrade your servers from 2012 RTM to 2012 R2, this can be done successfully for most cases since 2012 to 2012 R2 in-place upgrades are supported by Microsoft. If your 2012 RTM servers are running SQL Server 2012 RTM or SharePoint Server 2013 RTM, then read the following:

Upgrading to Windows Server 2012 R2 from 2012 RTM for servers running SQL Server 2012 RTM.

  • First install SQL Server 2012 Service Pack 1. Reboot when prompted.
  • Execute setup.exe from the Windows Server 2012 R2 installation media. Complete the upgrade.
  • Done.

Upgrading to Windows Server 2012 R2 from 2012 RTM for servers running Sharepoint Server 2013 RTM.

  • First install SharePoint Server 2013 Service Pack 1. Reboot when prompted.
  • Run Sharepoint Configuration Wizard to complete the upgrade. Reboot when prompted.
  • Execute setup.exe from the Windows Server 2012 R2 installation media. Complete the upgrade.
  • Install available Windows Updates after you can log in for the first time. Reboot when prompted.
  • Run the Sharepoint Configuration Wizard again. Reboot when prompted.
  • Done.

Performing an in-place upgrade to Windows Server 2012 R2 FROM a 2012 RTM server works just fine and, yes, to save time and resources I would recommend doing this if you have the ability to do so. The only problem is that it can take several hours for the in-place upgrade to finish per server, but it does work. As always, make sure you read Microsoft's official documentation on TechNet for your specific upgrade situation. Don't make the same mistakes that I did :)

- Joe