Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Moving sessions from one server to another server.

Posted on 2010-09-16
8
Medium Priority
?
4,535 Views
Last Modified: 2013-11-11
I have 80 Citrix Terminal servers. Every month they are patched using WSUS. Right now WSUS is set at Install patches but don't reboot with user on server. Which means that I have to Disable logons and then reboot each server manually when the users log off.  Is there anyway to move a citrix session over to another server? Or any recommendations for my patching dilemma?
0
Comment
Question by:drebaje
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 9

Expert Comment

by:Tomas Valenta
ID: 33692702
You can use reboot feature in XenApp Advanced Configuration/Properties on server object.
0
 

Author Comment

by:drebaje
ID: 33692848
Sorry I bit new to citrix. Where can I find that?
0
 
LVL 10

Expert Comment

by:Alan_White
ID: 33693691
To answer your question on moving sessions, No.  It would be nice but unfortunately can't be done.

We have started to use WuInstall in a start up script to Patch Terminal Servers.  We have a reboot schedule set so that they reboot every other day at 3am (two batches, half the farm each evening) but clearly you could choose a different schedule.

The location of the reboot schedule config depends on the verison of Citrx you are running.  It's in the old Presentation Server Console on PS4.5.  I think it's called XenApp Advanced Configuration in the newer version.

Anyway, you go in there, select a server, right click, properties, reboot schedule.  The rest is pretty obvious.  It's actually quite nice in that it disables logins ahead of time and sends messages to users.

More details on WuInstall here:  http://wuinstall.com/

0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 19

Expert Comment

by:basraj
ID: 33694238
1. Moving sessions not possible

2. You can reboot the server based during non-business hours so users will not be affected. You can schedule the reboot and also inform the users that servers will rebooted in few minutes if the users are logged in at the time of reboot.

In New versions:

Start\Programs\Citrix\Management Consoles\XenApp Advanced configuration
 
Click on server, select properties and reboot options in left pane.

in CPS4.5:

Open up Presentation console
Under the Servers folder - highlight server - properties - reboot schedule
0
 

Author Comment

by:drebaje
ID: 33694333
This would work perfectly, unfortunately it's a 24 hour workplace ( hospital ). In addition management doesn't want prompt users to log off.  I guess there is no way to automatically detect users on a server and reboot that said server when it detects no users...
0
 
LVL 19

Expert Comment

by:basraj
ID: 33694506
Similar to yours. Please check if this scripts help. Recommended that you test them before on your test servers:

http://lumbgaps.blogspot.com/2007/05/automatically-update-and-reboot-citrix.html
0
 
LVL 9

Expert Comment

by:Tomas Valenta
ID: 33695382
It is possible to do it by configuring load ballance policy and script. You must analyze environment of published applications and users logon times and based on these knowledges you must configure load ballance policies and write script for checking number of sessions on servers and if this number will be zero then restart and assign this server to the normal load ballance policy.
0
 
LVL 9

Accepted Solution

by:
Tomas Valenta earned 2000 total points
ID: 33701486
There is small script which display number sessions on every server. Based on situation if the session count is 0 then restart server.
Save this script as SessionsPerServer.wsf and run it on XenApp server.

<package>
    <job id="Sessions">
        <runtime>
            <description>
                List sessions per server in the farm.
            </description>
            <example>
                CScript //nologo SessionsPerServer.wsf
            </example>
 
        </runtime>
        <reference object="MetaFrameCOM.MetaFrameFarm"/>
        <script language="VBScript">
       
            Dim theFarm, aSession, SessionState, aServer

            SessionState = Array("Unknown", _
                                 "Active", _
                                 "Connected", _
                                 "Connecting", _
                                 "Shadowing", _
                                 "Disconnected", _
                                 "Idle", _
                                 "Listening", _
                                 "Resetting", _
                                 "Down", _
                                 "Init")

            Set theFarm = CreateObject("MetaFrameCOM.MetaFrameFarm")
            if Err.Number <> 0 Then
                WScript.Echo "Can't create MetaFrameFarm object"
                WScript.Echo "(" & Err.Number & ") " & Err.Description
                WScript.Echo ""
                WScript.Quit Err.Number
            End if

            theFarm.Initialize(MetaFrameWinFarmObject)
            if Err.Number <> 0 Then
                WScript.Echo "Can't  Initialize MetaFrameFarm object"
                WScript.Echo "(" & Err.Number & ") " & Err.Description
                WScript.Echo ""
                WScript.Quit Err.Number
            End if

            if theFarm.WinFarmObject.IsCitrixAdministrator = 0 then
                WScript.Echo "You must be a Citrix admin to run this script"
                WScript.Echo ""
                WScript.Quit 0
            End If

            WScript.Echo "MetaFrame Farm Name: " & theFarm.FarmName
            WScript.Echo ""

            For Each aServer In theFarm.Servers
                 ServerSessionCount = 0
            For Each aSession In theFarm.Sessions
                if Err.Number <> 0 Then
                    WScript.Echo "Can't enumerate sessions"
                    WScript.Echo "(" & Err.Number & ") " & Err.Description
                    WScript.Echo ""
                    WScript.Quit Err.Number
                End if        

                if aSession.ServerName = aServer.ServerName  Then              
                ServerSessionCount = ServerSessionCount + 1
                End If
            Next
            WScript.Echo aServer.ServerName & " Session count = " &  ServerSessionCount
            Next              
        </script>
    </job>
</package>
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Will try to explain how to use the VMware feature TAGs in the VMs and create Veeam Backup Jobs using TAGs. Since this article is too long, I will create second article for the Veeam tasks.
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question