Citrix Chained Reboot Scripts, now supporting Citrix Cloud, Citrix Virtual Apps and Desktops (CVAD), and XenApp/XenDesktop 5, 6, 6.5, and 7.x!

Share Button

Updated 2018.12.22: Revision 1.9 Now Supports Citrix Cloud!

One script now works with all current and modern versions of XenApp, XenDesktop, Citrix Virtual Apps and Desktops (CVAD), and Citrix Cloud Virtual Apps and Desktops Service from 7.0 and later, through 1811.

In zero-downtime 24/7 environments with shift employees, customers rarely want users to be notified of scheduled or mandatory XenApp server reboots. As a result, most of these environments have reboots disabled or this process is done manually. Unfortunately, this isn’t a good process since the XenApp servers are susceptible to memory leaks which can lead to failure and poor performance. By utilizing the included Chained reboot scripts, environments can take advantage of N+1 overallocation by processing a single server reboot while maintaining the user load on remaining systems. This has been done in such a way that users are not kicked off the system for scheduled reboots.  Instead, the server is removed from load balancing until all sessions have been logged off. Once all sessions have been logged off, the server will go down for a reboot.

Share Button
  1. Christina SChristina S12-07-2011

    As great as this script is, I am wondering why it sets the LE back to the production LE prior to a reboot? When this is done, it makes the server available to users again who can get sent to the server due to load balancing. and since the server is in mid-reboot, the end user will get an error launching the application. Is there any way to set the LE back AFTER a successful reboot?

    • youngtechyoungtech12-08-2011

      Christina,
      In order to register the server as operational before moving to the next server in the process list, the script looks at the load value to be less than 5000. The script sets the LE prior to reboot so that when it comes back up it will naturally drop its load reflecting the production LE. Additionally, when you reboot a Citrix server the IMA startup process kicks the server to 20000 load, then 10000 load until all necessary services startup and licenses are checked out. After this has been performed IMA will drop the load to 0. In order to understand why you are getting an error, can you send more details on your environment (i.e. XenApp version, Server OSs w/SPs, HRP levels) as well as the specific error messages that are received.
      Thanks,
      –youngtech

  2. RickRick12-07-2011

    I have tested your script, and it works for all the servers in the same subnet range… but when I go to subnets in other towns, even though they are connected via fiber, it fails at the err -2147220904 test. Tried googling the err value, and got nothing.

    Couple of suggestions, for the filtering, allow wildcards. And conversersly, add the ability to use wildcards to identify what servers should be included (e.g. XA6*)

    • youngtechyoungtech12-08-2011

      Rick,
      For the time being you will need to use the new exclude logic if you want to process specific servers. I could see incorporating logic for XenApp 6 and 6.5 to populate the server lists based on Worker Groups, but this would require additional dev/testing. Also, if you could send me some more details on your environment, I can attempt to reproduce to see where the script is failing with that error code. Are there firewalls restrictions in place for TCP/UDP ports over the WAN? Does that error code get registered in the Application Event Log? Can you send me as much detail as possible on the error and your environment? As you indicated, the error code alone is not helpful. At this point I would recommend you pick a server to process the script against local servers in each hub/datacenter.
      Thanks,
      –youngtech

  3. Rene MehrRene Mehr09-14-2011

    is it possible to exclude hosts from the script?

    • youngtechyoungtech12-08-2011

      Rene,

      This functionality has been implemented in Rev. 5.

      Thanks,
      –youngtech

  4. TomTom08-22-2011

    Never mind, I figured out you used >1% memory usage as the LE. I’ve tested this and it apparently works on our XA servers. Thank you, Tom

    • youngtechyoungtech12-08-2011

      Tom,

      Thanks for your feedback. In Rev. 5 I changed the LE to use Context Switching with 0/1 as low/high values respectively. This will ensure the servers receive a 10000 load during processing. I too have identified that in certain cases CPU utilization does not register a load properly, even with 0/1 low/high settings.

      Thanks,
      –youngtech

  5. TomTom08-22-2011

    I appreciate your writing this script etc.
    What/how does the NoLogon Load Evaluator work??
    I’ve been having trouble with getting a working load evaluator for our new XA 6.x farm.
    Thank you, Tom

    • youngtechyoungtech12-08-2011

      Tom,

      If you’re still having issues, please delete the NoLogon Load Evaluator (if it was created) and use Rev 5. I changed the NoLogon logic to use context switching so that the servers being processed will always register a 10000 load.

      Thanks,
      –youngtech

Leave a Reply to Matt Hornish Click here to cancel reply.