Seamless Automated Maintenance Windows with Login AM 2012R2
Before talking about automated maintenance windows in a hosted desktop environment we need to take a look at the different types of hosted desktops. On the one hand we have Server Based Computing (SBC) and on the other we have Virtual Desktop Infrastructure (VDI). Both hosted desktop types benefit from some form of automated maintenance window, but for different reasons and with different solutions. In this post I will focus on SBC. Saving VDI maintenance for a future post.
What do I mean when I talk about an automated maintenance window? Most organizations are familiar with maintenance windows. These are time frames during which IT personnel is allowed to apply changes to a production environment. Quite often these maintenance windows are scheduled once a week outside business hours or during the weekends. Quite often, IT personnel needs to plan what can be done during those maintenance windows and then race to actually get it done. In between those maintenance windows, IT personnel gets to listen to users complain about the inability of their IT department to cater to their needs.
Let’s make matters worse: enter server based computing. A typical server based computing environment has a much higher number of changes per week than for instance a file or webserver and SBC environments have users working on them almost constantly.
“So, when and how am I supposed to apply changes and fixes in a timely manner without creating downtime and frustrating my users in a SBC environment?”
Another reason why an automated maintenance window comes in handy is purely based on stability of the farm. Whoever thinks a modern version of windows (2008 or newer) is able to serve hundreds of different applications to hundreds of different users for 24 hours a day, 7 days a week and 12 months a year without needing an occasional reboot (as in almost daily) is mistaken. Terminal Servers serve end-user software with all the badly written code, memory leaks and locked registry keys that comes with it. (And no, App-V is not a solution for this).
“So, how can I reboot my machines regularly to prevent problem apps from becoming a problem?”
Back in 2005 we wrote our first scripted version of a seamless automated maintenance window that allowed us to reboot an entire farm without bothering the end-users. This took care of memory leaks and stuff on our terminal servers. The next step came when we realized that we could use this reboot schedule to apply changes as well. What better time to install software on a terminal server then right after a reboot when no users are online and all locked files, locked user profiles and memory leaks have been resolved.
Continuously update and improve
The process of this seamless and automated maintenance allows us to continuously update and improve our environments in small steps rather than taking one huge step every month but is surprisingly simple:
|Imagine running a farm with all users equally divided over your terminal servers and you need to apply an update to your environment. Your update has been tested in a test environment and your deployment system is waiting for the right moment to start installing the update.|
|First, we split the server farm in two groups and start draining the first group. This means that users that are on the first group of servers can continue their work but all new users will be redirected to the second group of servers. After a while, the first group of servers will not contain any users anymore.|
|The first group of servers can now be rebooted safely without any users noticing it. After the reboot, all changes you prepared are being applied and if needed the servers are being rebooted multiple times until all changes have been applied. When all the servers are back online switch.|
|Now the second group will go through the exact same steps. While new users will automatically logon to the updated systems, the second group is drained, rebooted and updated.|
Seamless automated maintenance in a nutshell:
- Help you do your job during office hours instead of the evenings and weekend
- Enable you to continuously improve and optimize your environment to meet your user’ demand
- Keep your systems running smoothly by regularly rebooting your systems
- Is incredibly cool to see in action