Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

Debugging Citrix XenDesktop _ XenApp

VIEWS: 215 PAGES: 41

									Debugging Citrix
XenDesktop &
XenApp
Jamie Baker
Manager, US Escalation Team
Kapil Ramlal
Sr. Software Maintenance Engineer
May, 2010
Agenda

• Troubleshooting Theory
• Brief Architectural Review
 • XenApp and XenDesktop
 • Common Components

• Common Problem Types
• Debugging Tools and Techniques



                           Citrix Conf idential - Do Not Distribute
                                     Troubleshooting Theory



Citrix Conf idential - Do Not Distribute
       Facts of Life
Good                   Bad

   Compare them Both
Troubleshooting

• Good
 • Know how the system is supposed to work

• Determine how to collect the data you need
• Bad
 • Collect data from the bad system

• Compare the Good system with the Bad
Brief Architectural Review
Putting It All Together
                                                  Find “best” virtual desktop
                                              Acquire license and determine settings

                             Authenticate
                                                          Desktop                            Start VM
                                                                                                             PVS          SAN
                                                     Delivery Controller
                                                  Register
                                                                                                                      PXE-boot VM
                          Connect
                                                                                                                       and stream OS
                           using ICA


                                                Log in
                                                   Virtual Machines                                      XenServer
  Full range of authentication
  methods supported through                       Apply profile                                  Deliver apps
  web interface technology

  Full support for SmartAccess                      Active Directory with
  and ICA session policies                           roaming profiles                                    XenApp

                                                 Citrix Conf idential - Do Not Distribute
The Desktop Delivery Controller

• Desktop Delivery Controller                                                                                 Licensing
 (Broker) Farm
• Uses core XA technology                                                                               Web Service
                                                                      WI
  • IMA, licensing, WI, ...                                                         DDC Servers                   VM Host
                                         User
• Delivers and controls
                                                                                                                  (XenServer, Hyper-V, VMware)




                                                                                          Service
                                                                                          Web
 access to virtual desktops
  •   VDA technology agnostic
  •   User authentication / single sign on                                                                        AD
  •   VM power management                                                            VDAs
  •   ICA policy decision                                                            (VMs, Blade PCs)



                                         Citrix Conf idential - Do Not Distribute
The Desktop Delivery Controller

• Worker / controller design                                             Licensing

   • Few controllers / many VDAs
   • DDC scales to 1000s of VDAs
   • DDC not in connection path           WI
                                                                   Web Service


• Dependent on Active              User        DDC Servers                   VM Host
                                                                             (XenServer, Hyper-V, VMware)




                                                     Service
 Directory




                                                     Web
   • User authentication
   • Communication security
   • Controller discovery                                                    AD

                                                VDAs
                                                (VMs, Blade PCs)
The Desktop Delivery Controller Core Architecture

                                     DDC Server
                                                                    VM Host      Domain
          HTTP                                                                   Controller
              80, 443
                               XML              Pool
   WI                         Service          Manager

          DCOM,                                                                VDA
          WCF               MFCOM /            Controller                 Workstation
                                                                        (VM or blade PC)
                                                                            Workstation
                                                                          (VM or blade PC)
          2514, 8000,      IMAProxy             Service
   AMC         DCOM
                                                                            (VM
                                                                     Desktop or blade PC)
                                                                                      PortICA
                                                             8080    Service           Svc

          IMA                            IMA
                2513                                                 PortICA          CGP
    PSC                       2512                                   Drivers          Svc
                        IMA    Licensing           ADO



                         DDC            License      Data
                        Servers         Server       Store
Virtual Desktop Agent

• “Virtual Desktop Agent”
  • Collection of services, drivers, ...
  • “PortICA”: ICA connectivity
  • “Desktop Service”: web service
    interface communicating with DDCs

• How does it relate to XenApp?
  • Majority of ICA code is shared
  • Does not use Terminal Services
  • Major changes in: WinLogon
    integration, session management, USB
    support

                                           Citrix Conf idential - Do Not Distribute
XenDesktop and Active Directory

• XenDesktop relies on AD for
  1.   Authentication of end users and admins
  2.   Mutual authentication of DDCs and VDAs
  3.   Encryption of network traffic
  4.   Discovery and authorization of DDCs by VDAs

• Each DDC farm can have an OU
  •    Only used for purpose 4.
  •    May (but need not) contain computer accounts
  •    Need not be configured at root OU level

• Alternative Discovery Method
  •    Configure DDC identity in VDA registry (see CTX118976)
                                     Citrix Conf idential - Do Not Distribute
Common Components

• The same ICA client can be used to access both XenDesktop and XenApp
• Citrix Web Interface can also be used for both
• Active Directory
• XML
• IMA
• DDC/ZDC (Although roles are a bit different)




                                    Citrix Conf idential - Do Not Distribute
Common Problem Types

            XenDesktop                                                               XenApp
  •VDA Registration Failure                                           • Data Store
  •VDA Connectivity / Reconnecting                                    •Server Connectivity / Reconnecting
  failure                                                             failure
  •Hyper visor Issues                                                 •Load Balancing
  •Service hangs (DDC/Poolmgr)
                                                                      •Black Hole
  •.NET Global Assembly Cache
  Exceptions                                                          •Service hangs (IMA/ZDC)

  •CPU                                                                •CPU

  •Memory                                                             •Memory


                                     Citrix Conf idential - Do Not Distribute
Debugging VDA Registration
Debugging VDA Registration
Debugging

• Use XDPing to check for time sync issues
• Check port connectivity (Telnet, XDPing, CtxPrtChk)
• Check resultant set of remote CDF trace with CDFControl
   DEMO: Capturing a policy for AD inconsistencies
• Check Event Viewer
• Capture remote CDF trace using CDFControl (CTX111961)



                        Citrix Conf idential - Do Not Distribute
Debugging VDA Connectivity
Debugging VDA Connectivity

• Leverage XDPing (CTX123278) to rule out common causes
• Capture remote CDF trace
• Check for display driver switching issues
• Ensure no WDDM display driver is being used
• Try reducing screen resolution and color depth




                         Citrix Conf idential - Do Not Distribute
The Global Assembly Cache
The Global Assembly Cache (GAC)

• Stores assemblies specifically designated to be shared by
  several applications
• Citrix XenDesktop VDA and DDC services use .NET, and
  rely on the GAC for shared assemblies




                         Citrix Conf idential - Do Not Distribute
The Global Assembly Cache (GAC)
Debugging

• When?
  •.NET components fail to start or encounters an exception, such as:
 FileNotFoundException   BadImageFormatException                        FileLoadException

• How?
   • Enable Fusion Logging (Registry Based Setting)
• The GAC Utility
 • Comes with Microsoft Visual Studio IDE
 • Can be used to reinstall GAC components
                             Citrix Conf idential - Do Not Distribute
The Black Hole Problem
(XenApp)
The XenApp “Black Hole” Problem

• Connections are routed to the Least Loaded Server in the
  Farm
• An underlying problems exists on the Least Loaded server
• Least Loaded Server still responds to IMA heartbeat pings
• ZDC gets the pings and routes to the broken server, causing
  a "Black Hole” effect



                         Citrix Conf idential - Do Not Distribute
The XenApp “Black Hole” Problem

• What are the 3 most important XenApp servers, from a
  connecting user's standpoint?
• How to quickly validate the health of these 3 servers?
  •How to monitor Farm Health using MedEvac (CTX119899)
  •Runs tests against:
  • Terminal Services
  • RPC
  • XML
  • Least Loaded Server

                          Citrix Conf idential - Do Not Distribute
What about XenDesktop?




            DEMO: Xnapshot (Sneak Peek)




                    Citrix Conf idential - Do Not Distribute
                                      A typical customer support
         A reasonable customer        engineer




“He does not know what he is doing”
                                     A typical customer support
       A capable customer            engineer




“I better not tell him what I did”
                                      Xnapshot tool makes it easy

  Next generation customer                                              Take-it-easy support engineer




“Smart – he knows what he is doing”
                                                                    We got all your information and we know what
                                                                    were changed.
Citrix Conf idential - Do Not Distribute
Capturing Post-Mortem Memory
Dumps
Capturing Post-Mortem Memory Dumps
User and Kernel Space

• Windows uses 2 levels of protection to restrict access to
  areas of memory
• System memory is divided into 2 spaces:
 • User Space
 • Kernel Space

• Applications run in User Space
• Operating System code and Drivers run in Kernel Space
Capturing Post-Mortem Memory Dumps
User Dump Capture

• Setup a default post-mortem debugger to catch crashing
  applications
• How to Set the NT Symbolic Debugger as a Default
  Windows Postmortem Debugger (CTX105888)
• Check for the managed debugger under:
 • HKLM\Software\Microsoft\.NETFramework
 • Value: DbgManagedDebugger
Capturing Post-Mortem Memory Dumps
System Dump Capture

• Configure in Startup and Recovery
 settings
• Ensure pagefile can store dump
• See MS Article cc976050 for registry
 settings
Capturing Post-Mortem Memory Dumps
System Dump Capture

• Dedicated Dump Drive (Windows 7+)
 • Location:
   HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\CrashControl
   Name: DedicatedDumpFile
   Type: REG_SZ
   Value: Dump path, such as D:\dedicateddumpfile.sys

• How to Recover Windows Kernel Level Dump Files from
  Provisioned Target CTX123642


                                Citrix Conf idential - Do Not Distribute
Capturing Post-Mortem Memory Dumps
System Dump Capture Tools

• The NMI switch (MS KB927069)
• Keyboard Initiated (MS FF545499)
• SystemDump 3.1 for 32-bit and 64-bit platforms
  (CTX111072)




                            Citrix Conf idential - Do Not Distribute
API Hooking
To Hook or not to Hook

• Try capturing a CDF trace on the particular component for
 deeper insight
 •Example: MF_Hook_SCardHook
• Try excluding the application from the hook to see how it
  behaves
• If it runs fine based on testing, then leave it excluded

     CTX107825 – HOW TO DISABLE CITRIX HOOKS ON A PER APP BASIS

                           Citrix Conf idential - Do Not Distribute
XenDesktop & XenApp Core Services

             XenDesktop                                                                           XenApp
  DDC:                                                                             ZDC:
  •Pool Manager Service (CdsPoolMgr.exe)
                                                                                   •IMA
  •XML Service
                                                                                   •XML Service
  •IMA
  •Desktop Delivery Service (CDSController.exe)                                    MEMBER XA SERVER:
  VDA:                                                                             •IMA
  •Workstaton Agent                                                                •XML
  •PortICA
  •CtxSvcHost
  •XML


                                                  Citrix Conf idential - Do Not Distribute
TechEdge Survey, Video Postings & PPTs

• The TechEdge survey will be emailed out
  to end-user customers
• If you complete the survey, you will be
  entered to win a $250 Amazon gift card.
  The winner will be announced June 1st.
• View TechEdge videos & PPTs on the
  Knowledge Center by Monday, May17th
  http://support.citrix.com/techedge2010

								
To top