Citrix Concepts, Notes & troubleshooting steps

CITRUS + UNIX= CITRIX

  • latest version: 7.18

Latest version & naming conventions of Citrix

Is Was
Citrix Virtual Apps and Desktops XenApp and XenDesktop
Citrix Workspace app Citrix Receiver and extensive enhancements
Citrix SD-WAN NetScaler SD-WAN
Citrix Secure Web Gateway NetScaler Secure Web Gateway
Citrix Gateway NetScaler Unified Gateway
Citrix Content Collaboration ShareFile
Citrix Files for Windows ShareFile Desktop App, Sync, &Drive Mapper
Citrix Hypervisor XenServer
Citrix Provisioning Citrix Provisioning Services

Citrix Powelshell >_  

Few PowerShell commands are useful in our day-to-day XD/PVS administration
Always add asnp citrix* @Starting of command or script run in XD environment
Add-pssnapin citrix.pvs.snapin @starting of command or script run in PVS environment.
  • Get-configzone |select name, controllernames — to get XD zone name along with DDCs
  • Get-brokercontroller -state active | select DNSname — active DDCs/Broker info
  • Get-BrokerMachine -MachineName domain\VDI name |select sessionusername,Sessionstarttime, machinename,DesktopGroupName — to get details of User who logged in the specific VDI
  • Get-BrokerMachine -Filter { registrationState -eq ‘unregistered‘ -and HypervisorConnectionUid -eq 2 } | Select machinename — unregistered VDIs info.
  • Get-BrokerMachine -Filter { registrationState -eq ‘unregistered‘ -and HypervisorConnectionUid -eq 2 -and Desktopgroupname -eq “del. group name” } | Select machinename, Desktopgroupname — unregistered VDIs from particular Delivery group.
  • Get-BrokerSession -MaxRecordCount <number> |Select-Object -Property DesktopGroupName,Machinename,Username, StartTime, Sessionstate |Sort-Object -Property Starttime | format-table–Ghost Session details
  • get-BrokerEntitlementPolicyRule |Select-Object -Property publishedname, SessionReconnection | format-table — to Delivery group & session connection details

Always – This is the default and matches the behavior of a VDI session.  Sessions always roam, regardless of client device.

DisconnectedOnly – This reverts back to the XenApp 6.x and earlier behavior.  Sessions may be roamed between client devices by first disconnecting them (or using Workspace Control) to explicitly roam them.  However, active sessions are not stolen from another client device, and a new session is launched instead.

SameEndpointOnly – This matches the behavior of the “ReconnectSame” registry setting in XenApp 6.x.  Each user will get a unique session for each client device they use, and roaming between clients is completely disabled.

Note:  Sometimes we get this warning if output contains info more than 250 lines. Only first 250 records returned. Use -MaxRecordCount <Num> to retrieve more.

Terms Xen Desktop & PVS (Provisioning Server) Terminology & Concepts:-

FMA (Flexcast Management Architecture) have more advantages than the IMA ( Indepedanat Managenment Architecture). FMA uses HDX technology where as IMA uses ICA protocal” Independant computer architecture”

  • Xen Desktop
    • Citrix Zone
    • Citrix Site
    • Citrix Studio
    • Citrix XD Database “SQL mirroring or SQL HA”
    • Citrix Director Console
    • Citrix Provisioning Methods (PVS & MCS -Machine Creation Services) PVS-Most recommended method in VDI environment.
    • Citrix XenDesktop Licensing
    • Citrix XenDesktop Hosting (Hyper-V/VMware/Xen Server)
    • DDC–Desktop Delivery Controller
    • Delivery Groups
    • Machine Catalogs
    • Services using in XenDesktop environment
      • Citrix AD Identity service

        xd services

        ^i^XD Services ^i^

      • Citrix Broker service
      • Citrix CDF Monitor service
      • Citrix Configuration service
      • Citrix High-Availability service
      • Citrix Host service
      • Citrix Machine Creation service
      • Citrix Monitor service
      • Citrix Storefront service
      • Citrix Trust Service
  • Citrix Provisioning Services(PVS) Console farm (Port 54321 to connect console)
    • PVS farm sites
    • Site servers
    • Vdisk Pool
    • Device collection
    • Citrix PVS Hosting ( Hyper-V/VMware/XenServer)
    • Main config file use in PVS is ‘ARDBP32.bin’ the same one is called as Bootstrap file
    • Services using in PVS
      • Stream Service
      • Soap Service

In XenDesktop environment Local Host Cache (LHC) & Connection Leasing (CL) are the options interlinked each other but functionality wise both are similar in nature.Either one among is enabled at once but not two together.Connection leasing cache available in DDCs for two weeks since last access.By default CL is enabled, if you want to enable LHC run below PS commands Set-BrokerSite -ConnectionLeasingEnabled $false & Set-BrokerSite -LocalHostCacheEnabled $true Note: XD7.12+ onwards LHC brought to XD stuff.

PVS Streaming Process:-pvs stream process

Previous versions:-

Citrix Xen App 6.5 & Its additional components.

Citrix Xen App Product versions:
      • Platinum
      • Enterprise
      • Advanced 
  1. Citrix XA mainly used in Application Virtualization (Now a days using in Desktop/Server Virtualization as well with a concept of Xen Server and provisioning services of Citrix)
  2. Citrix work on ICA traffic and which is very much less when compared to RDP traffic.
  3. Rough BW used by ICA traffic is 20 kbps, 2-5 kbps if encryption technology used, 32 kbps for HDX technology. Exclusive features of Citrix is 
      • Printing 
      • Multimedia streaming
      • Data/copy
  4. Citrix have more advantages (see below) have zero/less challenges, practically.
      • Less Bandwidth
      • Platform independent
      • Reliability compliance
      • More secure/encrypted environment
      • Application-wise access
XEN APP Terms & Concepts:-
      • Farm
      • Zone
      • Data collector
      • Data Store
      • Farm Servers/ Xen App servers/ XML Broker 
      • Web Interface
      • Applications
      • Load evaluators
      • Worker Groups 
      • Policies ( Device & User)
      • Administrators
      • Citrix Receiver/Receiver Enterprise
      • ICA Protocal
      • IMA Service
      • LHC ( Local Host Cache)
      • Secure Gateway/Access Gateway
      • Edge-sight server
Port Number Used in Citrix
      • 1494 (ICA)
      • 2512 (IMA)
      • 27000- 270009 ( License Server)
      • 7279 (XA to License server for check-in & check-out)
      • 8082 (License Management console)
      • 80 (xml/web interface)
      • 8080 (Secure web interface)
      • 2598 (Session reliability)
      • 1433
      • 25 (SMTP)
      • 161/162 (SNMP)
      • 443 (SSL)
      • 9035 (Edge sight server to client/server when taking live report)
Data Collector Elections preference
      • Most Preferred
      • Preferred
      • Default Preferred
      • Not Preferred
 Useful Citrix commands :-

QUERY FARM

Use query to display information about server farms within the network.

Syntax

query farm [server [/addr | /app | /app appname | /load | /ltload]]
query farm [ /tcp ] [ /continue ]
query farm [ /app | /app appname | /disc | /load | /ltload | /lboff | /process]
query farm [/online | /online zonename]
query farm [/offline | /offline zonename]
query farm [/zone | /zone zonename]
query farm [/?]

Parameters

appname
The name of a published application.
server
The name of a server within the farm.
zonename
The name of a zone within the farm.

Options

farm
Displays information about servers within an IMA-based server farm. You can use qfarm as a shortened form of query farm.
server /addr
Displays address data for the specified server.
/app
Displays application names and server load information for all servers within the farm or for a specific server.
/app appname
Displays information for the specified application and server load information for all servers within the farm or for a specific server.
/continue
Do not pause after each page of output.
/disc
Displays disconnected session data for the farm.
/load
Displays server load information for all servers within the farm or for a specific server.
/ltload
Displays server load throttling information for all servers within the farm or for a specific server.
/lboff
Displays the names of the servers removed from load balancing by Health Monitoring & Recovery.
/process
Displays active processes for the farm.
/tcp
Displays TCP/IP data for the farm.
/online
Displays servers online within the farm and all zones. The data collectors are represented by the notation “D.”
/online zonename
Displays servers online within a specified zone. The data collectors are represented by the notation “D.”
/offline
Displays servers offline within the farm and all zones. The data collectors are represented by the notation “D.”
/offline zonename
Displays servers offline within a specified zone. The data collectors are represented by the notation “D.”
/zone
Displays all data collectors in all zones.
/zone zonename
Displays the data collector within a specified zone.
/?
Displays the syntax for the utility and information about the utility’s options.

Remarks

Query farm returns information for IMA-based servers within a server farm.

Security Restrictions

You must be a Citrix administrator to run query farm .

Load Manager Values Explained: 

0 to 9998   This is the normal range for Load Manager.
99999          No load evaluator is configured.
10000        Load is at 100 percent (full load).
20000       The App Center console contains an incorrect server edition or a license mismatch.
99990        Results when a custom administrator with restricted rights runs the following QFARM commands
 
CHANGE LOGON —>Enable, disable, or drain session logins.
  CHANGE LOGON {/QUERY | /ENABLE | /DISABLE | /DRAIN | /DRAINUNTILRESTART}
  /QUERY    Query current session login mode.
  /ENABLE   Enable user login from sessions.
  /DISABLE  Disable user login from sessions.
  /DRAIN    Disable new user logons, but allow re-connections to existing sessions.
  /DRAINUNTILRESTART    Disable new user logons until the server is restarted, but allow re-connections to existing sessions.

type “C:\Program Files (x86)\Citrix\Independent Management Architecture\MF20.dsn”
Command to find data store server. *Few people use customized installation path.

Citrix useful links for my reference

Query Farm main and foremost command use to find/troubleshoot issues.
qfarm/query farm Command reference:  http://support.citrix.com/proddocs/topic/xenapp65-admin/ps-commands-query-farm-v2.html
Citrix Forums:https://support.citrix.com/
Citrix blogs:http://blogs.citrix.com/
Communication Ports Used By Citrix Technologies: http://support.citrix.com/article/CTX101810
http://support.citrix.com/servlet/KbServlet/download/2389-102-654859/CitrixPorts_by_Port_1103.pdf

Logoff disconnected RDP Sessions

This post is for my reference 🙂 

Tired of using mouse right+click & logoff “session ID” command at run.

Finally I got a solution to logoff  many disconnected RDP sessions at once.
It  is simple 😉

From Tsadmin console Start>run>tsadmin.msc>Choose a server >console right hand side click on users tab>select disconnected RDP users > right+click then Logoff 

I agree there are many scripts available to use to do this activity, but risk involved in using of scripts in production environment 🙂 I feel GUI is simple and easy way to accomplish this task.

To query user sessions: run commands qwinsta or query session