Upgrading an Existing SharePoint 2013 Farm to Windows Server 2012 R2
Now that SharePoint 2013 supports Windows Server 2012 R2 via service-pack 1, you might be wondering how to upgrade your existing 2012 vanilla farm. It is possible albeit not as simple as you might think and this article shows you how, but if you want a quick explanation it’s “install SP1 across the farm; upgrade Windows; repair each server with psconfig” – the last bit sometimes being necessary because the Windows upgrade can break the security token service, but is easy to fix.
Update: This method looks unsupported; do not use for production-like environments as this scenario hasn’t been tested by the product-group.
This process, in case it wasn’t already obvious will take the whole farm offline. It’s probably possible to upgrade the farm in such a way that keeps some kind of serviceability online if you make sure there’s enough service-application redundancy but that’s not covered here.
Prepare SharePoint Servers
Patch SharePoint 2013 Farm to SP1
Install SharePoint 2013 service-pack 1 on all servers if not already done. Without SP1 we can’t run Windows 2012 R2 with SharePoint 2013 (and be supported at least).
Next, complete the upgrade with psconfig/config-wizard to complete the upgrade process. If a server hasn’t been fully patched done yet you’ll see a warning about software version mismatches.
Prepare Windows 2012 R2 ISO
Windows 2012 is perfectly capable of mounting local ISO files as a virtual disc. Click the ISO, then run setup when the ISO is mounted.
Run setup, accept the UAC elevation and begin the install.
Try getting updates; it never hurts.
Make sure you install the GUI Windows only. SharePoint doesn’t support server core.
Make sure you select “upgrade” as it’s pretty much the entire point of this article/process.
Windows Upgrade Compatibility Check
The compatibility check will point out the Hyper-V device drivers might not work after the upgrade. We don’t mind. If you need to restart for any reason, setup will insist you do that 1st too here.
If your server has 4 million apps installed, these may cause problems with the upgrade. As this is my “production” environment, there is just SharePoint + prerequisites so this is what I see:
Running Setup & Upgrading Windows 2012 to R2
Once passed the compatibility checks, Windows setup should basically keep itself busy for the rest of the process without any interruption needed.
Setup will restart a couple of times.
Near the end of the upgrade you’ll see this.
Verify SharePoint Functionality & Fixing Errors
Your web-front-end/CA server should now look something like this:
As mentioned earlier, the upgrade to Windows 2012 R2 does leave SharePoint rather broken by default. Specifically the Security Token Service can break because of a problem with then SharePoint farm certificate.
Click on “view these issues” and you might see something like this:
STS is likely broken and the cache-cluster probably needs a reboot to get it working again. Fix the cache cluster by removing and then re-adding each cache server in turn (to somewhat oversimplify it – this is a rather brutal but effective approach I’d not recommend normally). For STS errors, a simple psconfig upgrade command per failing server (psconfig -cmd upgrade -inplace b2b) should fix that problem up.
Once the list of problems is resolved you need to thoroughly test the farm, including:
- Publishing sites (check for application errors/warnings on 1st hit). Make sure meta-data is working; try tagging something etc.
- Make sure you test this per web-front-end server. One WFE may not be working even if the others are.
- Searching – search for something that you know should come up in the results. Check it does.
- My Sites – go-to the “my-sites” root site and make sure there’s no error (if the user-profile service-app is broken in any way this will fail).
- Email – do something in SharePoint that will trigger an email to be sent; setup an alert of some kind and make sure the alert arrives.
- Business Data Connectivity functionality. Any SQL Server backed content-types or lists; make sure they load, etc.
…and with that you should be fully upgraded to Windows Server 2012 R2 for SharePoint 2013. Enjoy!
// Sam Betts