We often read about Virtualization and Systems Engineers who faced situations that they weren't prepared for. If they only had the information on hand, they could have quickly resolved the issue. Documentation for uncommon scenarios is vital to maintaining readiness in ambiguous situations. This article will help prepare you for one of those situations. This article explains how to properly shut down and start your ENTIRE Citrix environment.
You have a Citrix XenDesktop environment that needs to be shut down for "the unknown" reason. You need to bring down the Citrix servers in a safe manner to ensure that data is not corrupted and that they will work correctly once you power them back on. Examples of this reason could be for hardware maintenance, software upgrades, power outage and your batteries are about to run out of juice, etc.
2 x Delivery Controllers (DDC)
2 x Provisioning Services (PVS) Servers1
2 x Application Servers2
2 x Storefront Servers
1 x License Server
1 x Profile Server3
1 x SQL Server
1 x NetScaler
Each Citrix service/software is loaded onto a Windows Server 2012 Datacenter VM, with exception to NetScaler which is a Linux-based VM. They are all running in a VMware ESXi environment.
Shut Down Procedures
Confirm that each VM is shut down in vSphere before proceeding to the next step.
1. From a DDC, put all target devices (VDAs) into maintenance mode and then shut them down
2. Shut down all DDC servers
3. Shut down all PVS servers
4. Shut down SQL server
5. Shut down Application and Profile servers
6. Shut down Storefront and NetScaler4 servers/devices
7. Shut down License Server
Confirm that each VM is powered on with Citrix services running before proceeding to the next step.
1. Start License server
2. Start Application and Profile servers
3. Start SQL
4. Start all PVS servers
5. Start all DDC servers
6. Start Storefront and NetScaler servers/devices
7. Take target devices (VDA) out of maintenance mode and start them (or allow them to start based on power management)
This is a fully tested plan that I have successfully employed twice in my environment. To ensure my documentation was solid and that all of the unknowns were covered, I contacted Citrix Support to verify my plan was sound. They didn't have this procedure documented. (I essentially gave them the documentation). My guess is that they assumed, once you deploy your environment, you'll never shut it down. This assumption may work for a large enterprise that can afford triple redundancies but isn't appropriate for smaller companies with a limited budget. This plan is also needed for insurance when "the unknown" reason comes up.
After an escalation team with Citrix looked over this plan, they confirmed this process to be solid.
1 Provisioning Services- This assumes that the vdisk(s) is stored on each PVS server and then copied using robocopy. If you have the vdisk(s) stored on a file server (single, DFS, replication, etc.), then you will shut down the file server(s) after the PVS servers are shut down.
2 Application Servers- This assumes only the apps are installed on the application servers and control of that software is done from the Citrix Studio console on the DDC servers. This does not account for Citrix services running on the application servers.
3 Profile Server - This server has the Citrix UPM profile folders and GPO folder redirection data stored here. This plan assumes that once all VDAs are shut down, there will not be any users accessing this data.
4 NetScaler- Ensure that you write the running config to memory before shutting down.
Please let me know if there are any technical or grammatical errors in this article.