1.19k likes | 1.9k Views
SUM303: XenDesktop Advanced Troubleshooting. Mick Glover. Senior Support Readiness Specialist. October 16, 2012. Agenda. Overview XD5.x Architecture Basics Logging & Tracing Key Support Tools Overview Using PowerShell to monitor your site Troubleshooting Example(s). Overview.
E N D
SUM303: XenDesktop Advanced Troubleshooting Mick Glover Senior Support Readiness Specialist October 16, 2012
Agenda • Overview • XD5.x Architecture Basics • Logging & Tracing • Key Support Tools Overview • Using PowerShell to monitor your site • Troubleshooting Example(s)
Before we begin.. A Question Q. To date, what is the most common problem logged with technical support worldwide in 2012? A. VDA Connectivity issues (Registration, Connection/Disconnection…)
The Good News… • Its not all about verbose Logging and Tracing… • The following goes a long way… • Good Understanding of Product Architecture • Knowing what to expect • Knowing what to trace and when
XenDesktop 5 Architecture - .Net SOA Desktop Studio Desktop Director PoSH PoSH WCF [80] WCF [80] WinRM 2.0 [5985/5986] Broker Machine Creation Service Host Service AD Identity Service Configuration Service Broker Service Virtual Desktop Agent (VDA) Machine Identity Service PVS for VMs Agent Group Policy Engine Machine Creation Services Broker Service Infrastructure Services SQL Server SQL Server SQL Server
Services Key Responsibilities Broker Service • VDA registration, Resource allocation, Power MGMT & Licensing enforcement Configuration Service • Provides Directory Services, MetaData storage & security Host Service • Manages Hypervisor connection & resources
Services Key Responsibilities Machine Creation Service • Creates & manages VMs and Master images Machine Identity Service • Creates & manages the disks attached to VMs AD Identity Service • Creates & manages AD Computer a/c’s
Registration Basics • VDA registration • Process of locating a controller and establishing ongoing communication • WCF web service endpoints on both ends facilitate the registration process • Registration methods • Registry base registration • AD base registration • Quick Deployment registration • Registration types • Soft Registration • Hard Registration
WCF Registration port Specifics XD5.x: TCP/IP port 80 • Controller and VDA Ports can be set differently on controller and VDA Special consideration when changing the WCF port on controllers if using Registry based registration i.e. ControllerRegistrarPort
Configuring Registry based registration ListOfDDCs
Checking the WCF port on a Controller BrokerService.exe /show
Changing the WCF port on a Controller BrokerService.exe –vdaport 89
Changing the WCF ports on the VDA • Re-configure the VDA • (add/remove programs) Or • HDX Computer Policy
Changing the WCF ports on the VDA Confirming the changes (registry)
Changing the WCF ports on the VDA Confirming the changes (.Config file)
ControllerRegistrarPort Details Hardcoded on VDA to use port 80 Value must be manually changed if VDA WCF port is changed on Controller When using AD based registration • WCF port is included as part of the URL attribute and therefore this manual change is not required as each controller will update its own details in AD
ControllerRegistrarPort Registry value created after re-configuring the VDA
ControllerRegistrarPort - Known Issue Changing Virtual Desktop Agent Port Using Add/Remove Programs Fails Cause: ControllerRegistrarPort is created incorrectly with an ending space Resolution: Manually delete and recreate Registry value Note: CTX131263 also includes updated binary's which can be deployed to resolve the issue without having to manually edit the registry
VDA Heartbeat Details Value: HeartbeatPeriodMs • Originally a 1 minute timeout (60000ms) with the VDA sending a ping every 30 seconds (an interval of half the timeout value) Since the release of XD5 SP1, the default timeout/ping interval has changed to 10 & 5 minutes respectively…
.NET <Service>.exe.Config files Available logging mechanisms "LogToCDF" - if present and set to 1, will log to CDF using the supplied CDF trace module "LogFileName" - if present, will log to the specified file name • "OverwriteLogFile" - if present, will overwrite existing log to the file if it already exists Note: More than one sink can be specified, in which case logs will be output to all of them…
Out of the box… • CDF Tracing enabled for all services • <Service>.exe.Config <appSettings> <add key="LogToCDF" value="1" /> </appSettings>
Out of the box… • CDF Tracing enabled for all services • <Service>.exe.Config <appSettings> <add key="LogToCDF" value="1" /> </appSettings> • Clear text logging disabled
WCF Service Logging - Example Enabling clear text logging Edit WorkStationAgent.exe.Config Add the lines in Green below to enable and control clear text logging Set appropriate NTFS permissions Restart Citrix Desktop Service (WorkstationAgent.exe)
PortICA logging • PortICA can produce both CDF and clear text output for debugging purposes • Disabled by default • Create PorticaConfig.XML and place under the following directory on the VM • C:\Program Files\citrix\ICAService\XML • XML directory must be manually created Note: Once PorticaConfig.xml has been created and placed in the correct directory, it must be configured
<?xml version="1.0" encoding="utf-8"?><Config xmlns="Portica.xsd"> <Portica><LogFile><LogLevel>5</LogLevel></LogFile><CdfTrace><LogLevel>5</LogLevel></CdfTrace> <FunctionTrace> <LogLevel>5</LogLevel> </FunctionTrace> </Portica></Config> Configuring PorticaConfig.XML • LogFile • Level 0,1,5,9 supported • 0 = disabled • CdfTrace • Level 1,5,9 supported • FunctionTrace • Values 1,5,9 supported • Master flow control Note: Cdf tracing is enabled by default for PortICA. The above values just control the verbosity of the output.
PortICA clear text logs • Logs files are automatically saved to the following locations • XP C:\Documents and Settings\LocalService\Local Settings\Temp • Win7 C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp
Making the process easier… Logging Enabler v2.0
Don’t forget Windows Event Viewer Application Log - VDA XenDesktop 5.5 - VDA Event Log Messages http://support.citrix.com/article/CTX133154
Don’t forget Windows Event Viewer Application Log - Controller XenDesktop 4.0 - VDA and DDC Event Log Messages - http://support.citrix.com/article/CTX133152
Finding & Validating Controllers VDA.log (WorkstationAgent.exe)
Confirming Successful Soft Registration Broker.log (BrokerService.exe)
Soft Registration • Soft registration • VDAs are not yet belong to a desktop group • Only partial registration action done • No config sent (XML) or status monitoring initiated • No session launching or management is permissible • VDA appears in Desktop Studio as registered • Avoids unwanted registration delays • Avoids network traffic and event logs
Viewing Soft Registered Machines XDDBDiag - XenDesktop Site Summary
Hard Registration • Promotes soft to hard registration • Once VDA is added to a group • Configuration data send to site database • Status monitoring initiated (ready or power-off etc.)
CDF Tracing overview • The acronym goes by several names • Citrix Diagnostic Facility • Common Diagnostic Facility • Common Diagnostic Function • CDF is a system to capture diagnostic output from specific modules in Citrix products which can be very helpful when troubleshooting issues • The trace messages are coded into the product and displayed with appropriate status and error codes when run
CDF messages in the source code [ [ OR 43
Trace Message Format Files (TMFs) How it works Raw CDF events are captured as GUIDs from the Citrix modules. To convert these to human-readable strings, the GUIDs need to be matched with their corresponding descriptions. The mapping of GUIDs to descriptions is accomplished by the use of TMF files which are similar to PDB debug files…
TMF Files Public & Private There are two varieties of TMF files: Public and Private • Public TMF files reveal basic state and function information for customers and partners • Private TMFs are for internal Citrix use only and are used by escalation engineers and development while debugging. These files contain references to source code. Public TMF server: http://ctxsym.citrix.com/tmfs/xaxd Public TMFs are also available at ftp.citrix.com for externally use
Key Support Tools • Tracing & Logging • CDFControl • CDFCheck • CDFMarker • CDFMonitor • LogEnabler • Monitoring & Collection • Scout • XD Site Checker • HDXMonitor • Database and Services • XDPing • XDDBDiag
CDFControl (1/2) • The primary tool used to control and consume CDF traces • All available Citrix modules • Additional features include • performance data capture • tracing on system startup • common error code lookups • expert control to zero-in on true errors and failures • Available at http://support.citrix.com/article/CTX111961