effectively and efficiently troubleshoot application virtualization

96
Justin Zarb Senior Premier Field Engineer Microsoft Corporation http://appvguy.com http://blogs.technet.com/virtua lworld @justinzarb When Things go Wrong… How to effectively and Efficiently Troubleshoot Application Virtualization (App-V) Deployments SESSION CODE: #CLI307

Upload: odinmultrix

Post on 27-Oct-2014

64 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Effectively and Efficiently Troubleshoot Application Virtualization

Justin ZarbSenior Premier Field EngineerMicrosoft Corporationhttp://appvguy.com http://blogs.technet.com/virtualworld @justinzarb

When Things go Wrong… How to effectively and Efficiently Troubleshoot Application Virtualization (App-V) Deployments

SESSION CODE: #CLI307

Page 2: Effectively and Efficiently Troubleshoot Application Virtualization
Page 3: Effectively and Efficiently Troubleshoot Application Virtualization

3

Session Objectives and TakeawaysWhat YOU will Learn

Learn about issue prevention: pre-requisites, validationIdentify troubleshooting techniques for common issuesReview common issues discovered in the field, their root cause, and resolutionDemos: Tools to parse logs for decision making on top issues, analyzing trends“How To” for log files (Appendix)

Which, where, when, howAdditional issues, root cause, resolution

Page 4: Effectively and Efficiently Troubleshoot Application Virtualization

4

Agenda

App-V Management Server troubleshootingApp-V Server architectureTroubleshooting scenarios

DeploymentApplication ProvisioningCare and feeding

Client troubleshootingApp-V Client architectureTroubleshooting scenarios

DeploymentPublishing virtual applications to usersDelivering virtual applications to usersOngoing use of virtual applications (runtime)

Page 5: Effectively and Efficiently Troubleshoot Application Virtualization

5

App-V Management Server Architecture

App-V Management

Service

App-V Management

Console

App-V Management

Server

App-V Management Server

App-V Data Store (SQL)

Active Directory

App-V Client

Page 6: Effectively and Efficiently Troubleshoot Application Virtualization

6

Scenario #1 –Server DeploymentIssue Prevention

App-V Management Server log%temp%\Softgrid-Server-Setup.txt

Enable MSI installation logging HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\WindowsCreate a new key – ‘Installer’Create a new string – ‘Logging’, value ‘ voicewarmup!’

Install pre-requisites for server componentsManagement Server: No pre-requisite softwareManagement Console: No pre-requisite softwareManagement Service

IIS role with defaults, plus:ASP.NET (and dependencies)Windows AuthenticationIIS Management scripts and tools

Page 7: Effectively and Efficiently Troubleshoot Application Virtualization

7

DeploymentIssue Prevention – Preparing for Server deployment (Cont’d)

Considerations for setup of:Secure Server (RTSPS)

Request and install certificate

Make sure Management Server service account has access to private key

SQL Server®Confirm your IT admin has admin rights to the database (required by the installer)

If no admin rights to DB - Creating a New Application Virtualization 4.5 Database Using SQL Scripting

Active Directory® (AD)Create group for App-V Server admins and users

Page 8: Effectively and Efficiently Troubleshoot Application Virtualization

8

DeploymentIssue Prevention – Preparing for Server deployment (Cont’d)

Configure Windows FirewallIf using RTSPS, allow connection port 322If using RTSP, allow connection to program files

sghwdsptr.exe, sghwsvr.exe Configuring port 554 not sufficient

Share content directory

Page 9: Effectively and Efficiently Troubleshoot Application Virtualization

9

DeploymentHTTP Server for Streaming

Set up for streaming virtual apps or .osd Launch IIS Manager

Configure MIME type for .osd , .sftIn Default Web site, add Virtual Directory, set physical path to path of shared content directory

AdvantagesStreaming easily integrates with existing IIS infrastructureCan stream to remote clients in the cloudBetter performance in high latency, low bandwidth networks

LimitationClients need to be configured to point to new .sft, perform publishing refresh to get new package versions

Page 10: Effectively and Efficiently Troubleshoot Application Virtualization

10

DeploymentIssue Prevention – Post Deployment Server Validation and Checks

Verify App-V Management Server service is startedConnect to App-V system through Management Console

Add Management Service – hostname, portIf successfully added – web service, database are up and running

Page 11: Effectively and Efficiently Troubleshoot Application Virtualization

11

DeploymentIssue Prevention – Post Deployment Server Validation and Checks

Additional check for Management ServiceURL check:

Launch URL http://webserver_name/SoftGridManagement/Authorization.rem?wsdlYou get “System.NullreferenceException: Object reference not set to an instance of an object.”

Database connection check:Search SftMgmt.udl in install directoryIn file properties, click Connection tab or open file in OLE DB Core Services Test connection

Page 12: Effectively and Efficiently Troubleshoot Application Virtualization

12

Deployment – Issue #1Management Service Installation

Issue: When installing Management Service, ‘Error 25120 unable to create the required IIS virtual directory’

Root cause: IIS or ‘IIS Scripts and Management Tools’ is not installedResolution: Install IIS and role service ‘IIS Scripts and Management Tools’

Investigation: Creation Of COM object failed as object is not found *.txt

Page 13: Effectively and Efficiently Troubleshoot Application Virtualization

13

Deployment – Issue #2Management Service Installation

Issue: Error 25122 when installing Management Service

Root Cause: Attempted to install Management Service on a machine where ‘Default web site’ (in IIS) was renamed

Resolution: Re-name to ‘Default Web Site’ in IIS Manager

Page 14: Effectively and Efficiently Troubleshoot Application Virtualization

14

Deployment – Issue #3Management Service Usage

Issue: Error connecting to Management Service in management console – Error code: 0000C824Investigation: Error message to user, error message in install log

Root Cause: Management service is uninstalled – error in log indicates that server.conf and sftMgmt.udl do not existResolution: Re-install Management Service

Page 15: Effectively and Efficiently Troubleshoot Application Virtualization

15

Agenda

App-V Management Server troubleshootingApp-V Server architectureTroubleshooting scenarios

DeploymentApplication ProvisioningCare and feeding

Client troubleshootingApp-V Client architectureTroubleshooting scenarios

DeploymentPublishing virtual applications to usersDelivering virtual applications to usersOngoing use of virtual applications (runtime)

Page 16: Effectively and Efficiently Troubleshoot Application Virtualization

16

Scenario #2 – Application ProvisioningIssue Prevention - Setup

Copy virtual package to CONTENT folderManagement Server Console:

Set Content path or URL for .osd/icons in Server MMC (System Options) Create a new application group and import applications

Verify HREF in .osd points to .sft in package folder (unless ASR/Policy/envt. variable is set on client)

Page 17: Effectively and Efficiently Troubleshoot Application Virtualization

17

Application Provisioning Issue Prevention - Validation

Ensure at least one app is imported on the server Perform policy refresh on a client Launch app

Page 18: Effectively and Efficiently Troubleshoot Application Virtualization

18

Application Provisioning– Issue #1Policy Refresh

Issue: Apps successfully imported on server and publishing refresh successful on client, but no apps appear in client console

Investigation: Review sftlog.txt (client log file)

Root cause(s): Content folder is not shared, OS Tag mismatch, user not added to correct group entitlement

Resolution(s): Share content folder, add OS to OSD, add user to correct group

Page 19: Effectively and Efficiently Troubleshoot Application Virtualization

19

Application Provisioning– Issue #2Policy Refresh

Issue: Error 2A-80090322 when performing a publishing refresh or launching a virtual application or “The target principal name is incorrect. “

Root Cause: App-V Management Server service is configured to logon as a domain user instead of default Network Service Account and Service Principal Name (SPN) has not been registered

Resolution: Set the SPN on the Management Serversetspn -A SoftGrid/<FQDN of your machine> <YourDOMAIN>\<YourServiceAccountName> setspn –A SoftGrid/<NetBIOS name of your machine> <YourDOMAIN>\<YourServiceAccountName>

Page 20: Effectively and Efficiently Troubleshoot Application Virtualization

20

Scenario #3 – Care and FeedingOngoing Use of Management Server

To narrow down an issue during debugging, reduce concurrent activity (not for perf. issues)

Set the number of cores to 1In Server MMC, select the server in the default server group, the go to properties – Advanced tab Restart the server service

Page 21: Effectively and Efficiently Troubleshoot Application Virtualization

21

Care and FeedingCentralized Management of Globally Deployed Servers

Centrally manage and review multiple servers through consolidating location where logs are generated

Applies to Sft-server.txt, SQL DB logs

To troubleshoot DB specific issues, increase log level for SQL DB using these settings

Same can be done for Sft-server.txt

Page 22: Effectively and Efficiently Troubleshoot Application Virtualization

22

Care and Feeding – Issue #1Issue: Management Server service stopped, gives error on restart

Investigation: Review log file sft-server.txt

Root cause: SQL Server service stoppedResolution: Restart the SQL Server service and restart the management server service

Page 23: Effectively and Efficiently Troubleshoot Application Virtualization

23

Care and FeedingVirtual Applications Usage Data

Used to help make business decisions on buying softwareSent to the App-V data store via publishing refresh

Page 24: Effectively and Efficiently Troubleshoot Application Virtualization

24

Care and Feeding – Issue #2Virtual Applications Usage Data

Issue: Virtual applications usage data is not accurate

Investigation: Review refresh policy settings on the client and the server

Root cause: Publishing refresh disabled on client or set to ‘Refresh publishing on user login’

Resolution: Set 1 day refresh policy on client by setting ‘Refresh publishing occurs every’ Best Practice is to deploy refresh policy setting on server (overwrites the policy set on client) versus client

Page 25: Effectively and Efficiently Troubleshoot Application Virtualization

25

Care and Feeding – Issue #3Issue: After server install, cannot change database the server is pointing toInvestigation: Review ‘Reset administrators’ in Server MMCRoot Cause: UI does not workResolution:1. Edit SftMgmt.udl: Data Source,

Initial Catalog2. Edit registry on server:

HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\SOFTGRID\4.5\SERVER\

SQLDatabaseName, SQLServerName, SQLServerPort

3. Edit database info in Default Server Group properties Logging tab->Edit SQL Database

4. Restart the management server service

Page 27: Effectively and Efficiently Troubleshoot Application Virtualization

27

AgendaManagement server troubleshooting

App-V server architectureTroubleshooting scenarios

DeploymentAdding package, importing virtual applicationsCare and feeding

Client troubleshootingApp-V client architectureTroubleshooting scenarios

DeploymentPublishing virtual applications to userDelivering virtual applications to userOngoing use of virtual applications (runtime)

Page 28: Effectively and Efficiently Troubleshoot Application Virtualization

28

App-V Client ArchitectureApp-V Client

System-Guard Transport

Desktop ConfigurationClient (sftdcc.exe)

VSA (sftvsa.exe)

Front-End Component(sfttray.exe)

Client Core

File System

Listener (sftlist.exe)

Page 29: Effectively and Efficiently Troubleshoot Application Virtualization

29

Client Logging

MSI Installation LogSimilar to App-V Server Installation

App-V Client Log File%programData%\Microsoft\Application Virtualization Client\sftlog.txt

Transport Log Files%programData%\Microsoft\Application Virtualization Client\sftnta.txt%programData%\Microsoft\Application Virtualization Client\sftlist.txt

System Event Logging

Page 30: Effectively and Efficiently Troubleshoot Application Virtualization

30

Scenario #4 – Client Deployment Prevention – Preparing for Client deployment

Install or upgrade App-V client Setup.exe (GUI or CLI)

Detects and installs pre-requisitesSetup.msi (GUI or CLI)

Does not detect or install pre-requisites

Enable MSI logging prior to installPre-requisites: VC++ 2005 Redistributable, VC++ 2008 Redistributable, error reporting

Page 31: Effectively and Efficiently Troubleshoot Application Virtualization

31

DeploymentPost install validation - How to Read MSI Logs

For successful install:Find string ‘1603’ or ‘value 3’ – should give no results

For failed install:Find string ‘1603’ – indicates custom action failedFind string ‘value 3’

Indicates an install errorString ‘error’ can give false positives

Find string ‘SWICoreInitialize’Indicates start of a custom actionHelps identify the failed custom action

Find string ‘IsInBadState()’: Error – one or more drivers was not uninstalledFind the uninstalled driver – Sc qc <driver name>Delete driver file(s) and re-install

Page 32: Effectively and Efficiently Troubleshoot Application Virtualization

32

Deployment – Issue #1

Issue: Error 25010. A prerequisite for installation is missing. Installation cannot continueInvestigation: Error message to user – error message in MSI log

Root cause: Installing using setup.msi, which does not install pre-reqsResolution: Install using setup.exe or manually install pre-reqs prior to running setup.msi

Page 33: Effectively and Efficiently Troubleshoot Application Virtualization

33

Scenario #5 – Publishing Virtual Apps to Client

Publishing sequence:Publishing refresh occurs on the client User authenticated by management serverServer sends applist.xml file to client Client retrieves .osd files and icons

Publishing provides to client:ShortcutsFile type associationsPackage definitionContent source location

Recommended blog posting: http://blogs.technet.com/softgrid/archive/2009/02/17/a-story-of-a-publishing-refresh-request.aspx

Page 34: Effectively and Efficiently Troubleshoot Application Virtualization

34

Publishing – Issue #1

Issue: Publishing refresh fails

Investigation:

Verify server is accessible (ping it)Telnet to server

If still no issue found, RDP to the server box and verify Management Server service is running

Root cause: Management Server service has stopped

Resolution: Restart the service and do publishing refresh again

Page 35: Effectively and Efficiently Troubleshoot Application Virtualization

35

Publishing Virtual Apps to ClientDecoding Client Error Messages

22 characters 4605F5-19D0810A-10000004Characters:

1-6 Version and build7-12 File and line info where error occurred 13-14 Error category code 15-22 Problem code (error text in sfterr.xml)

Note: Characters 1-12 vary with each build, but 13-22 are constant across builds.

Page 36: Effectively and Efficiently Troubleshoot Application Virtualization

Publishing Virtual Apps to ClientDecoding Client Error Messages

Example of decoding client error message 4605F5-19D0810A-10000004

Minimum of last 10 characters required for root cause analysis460 Release number

5F5 Hex for Build number 1525

19D081 File ID and line where error occurred

0A Error category: Net Transport Agent

10000004 Problem ID: info from sfterr.xml

00 UNK Unknown

01 FEC Front-End Component

02 SVR Server

03 LST Listener

04 COR Client Core

05 XML XML Library

06 USR User Library

07 FSL Core FS Interface

08 FSI FS Interface

09 FSD FS Driver

0A NTA Net Transport Agent

0B CDC Codec

0C SGL SystemGuard Library

0D SGD SystemGuard Driver

0E INT Client Interface

0F VSM Visual Service Manager

10 SEQ Sequencer

11 SYN Synchronization Manager

12 DCC Desktop Config Controller

13 RPC Remote Procedure Call

14 PFM Platform Library

15* DDE DDE Launcher

16* MDE Minidump Exception

17* MAPI MAPI

18* SCR Script

19-1F Reserved

Page 37: Effectively and Efficiently Troubleshoot Application Virtualization

37

Scenario #6 – Delivering Virtual Apps to UsersStreaming Scenario

Delivery sequence: User double-clicks on application iconApplication content is streamed to the client cache Application is started

Delivery begins at message‘checking for updates’ Delivery completes at message ‘Launching <app name> (100%)’

Page 38: Effectively and Efficiently Troubleshoot Application Virtualization

38

Delivery – Issue #1

Issue: App launch fails with error 4604EE8-19D07F2A-0000274D

Investigation: Review sftnta.txt

Root Cause: Cannot contact server

Management Server Service Stopped

Resolution: Restart Management Server Service

Page 39: Effectively and Efficiently Troubleshoot Application Virtualization

39

Delivery – Issue #2Issue: Application launch fails with error 4604EE8-1690140A-20000194

Investigation: Check sftlog.txt (client log), sft-server.log, Management Server ConsoleRoot Cause(s):

o The .sft file path or the .sft file name is invalid.o App no longer exists but shortcut still present o The Provider Policy does not exist

Resolution: o Set the correct path to SFT fileo Delete the shortcuto Set correct Provider Policy in .osd

Page 41: Effectively and Efficiently Troubleshoot Application Virtualization

41

Scenario #7 – Ongoing Use of Virtual Application (Runtime)

Failures during regular use of virtual apps (after launch completes)Isolate runtime issue

Launch when app is 100% loaded in client cacheEliminate issues related to publishing and delivery of app

Error message dialog box does not indicate App-V error

Page 42: Effectively and Efficiently Troubleshoot Application Virtualization

42

Ongoing Use of Virtual ApplicationKernel and User Dumps

Best to have full dump (including kernel and user)Must dump Kernel if entire system is deadlockedMost useful info for CSS to troubleshoot

Page 43: Effectively and Efficiently Troubleshoot Application Virtualization

43

App-V Resource Kit Tools

New kit released Feb 2010Tools

App-V Application Listing ToolApp-V SFT Parser ToolApp-V Client Log Parser UtilityApp-V Cache Resizing ToolApp-V Dynamic Suite Composition Tool

New tools addedApplication Virtualization SFT View Tool

Application Virtualization MSI Compat Transform

Page 44: Effectively and Efficiently Troubleshoot Application Virtualization

44

Session Objectives and TakeawaysWhat YOU will Learn

Learn about issue prevention: pre-requisites, validationIdentify troubleshooting techniques for common issuesReview common issues discovered in the field, their root cause, and resolutionDemos: Tools to parse logs for decision making on top issues, analyzing trends“How To” for log files (Appendix)

Which, where, when, howAdditional issues, root cause, resolution

Page 45: Effectively and Efficiently Troubleshoot Application Virtualization

© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after

the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 46: Effectively and Efficiently Troubleshoot Application Virtualization

46

Troubleshooting

App-V Client Log FilesClient

Client Installation Log, in %temp% starts with „msi“SFTLOG.TXT, log levels

Critical ErrorWarningInformationVerbose

Sftlist.exe /resetlog or /verboselog or in Registry

Page 47: Effectively and Efficiently Troubleshoot Application Virtualization

47

App-V Client Log Files cont.

App-V Client Network Transport Agent (NTA) log file

HKLM\SOFTWARE\...\SoftGrid\4.5\Client\Configuration

REG_DWORD NtaLogMask

Page 48: Effectively and Efficiently Troubleshoot Application Virtualization

48

NTA Log Levels

Level Description

0xFFFFFFFF All logging

0x00000000 No logging

0x0000FFFF All errors

0x00000001 Socket errors

0x00000002 General errors and control flow

0x00000004 RTP errors

0x00000008 RTCP errors

0x00010000 Information

0x00020000 NTA interface

0x00040000 Session creation and deletion

0x00080000 RTSP connection creation and deletion

0x00100000 RTP packets received

0x00200000 RTCP packets received

Page 49: Effectively and Efficiently Troubleshoot Application Virtualization

49

App-V Client Log Files cont.SFTLDR.Log Can be used to see if a virtualised Service or virtual com is problematicBe carefull it grows very quickly In the Systemguard Key set „UnhandledExceptionFilterLocation“ REG_SZ and the location where you would like to write the log

Page 50: Effectively and Efficiently Troubleshoot Application Virtualization

50

ETL Tracing

All Filesystem Information will be logged here %Allusersprofile%\documents\Softgrid ClientThere are two Files

SFTFS.ETLSFTFS.ETL.OLD

Service restart, recycles the files

Page 51: Effectively and Efficiently Troubleshoot Application Virtualization

51

Client DumpsWhen the App-V Client crashes , it write a Dump FileLocation: %Alluserprofile%\Documents\Softgrid Client\DumpsCan be configured via Registry

Page 52: Effectively and Efficiently Troubleshoot Application Virtualization

52

App-V Server Log FilesLocated in the Installtion Dir \Logs

SFT-Server.logChange logging

In the Start Parameter box for the Service add the –d switch with the Loglevel you want to use

0: Transactions 1: Fatal Errors 2: Errors 3: Warnings 4: Informational 5: Debug (Verbose) 6: Trace

Page 53: Effectively and Efficiently Troubleshoot Application Virtualization

53

App-V Server Log Files cont.Server Setup Log File

Created during InstallationLocated in %Temp%

MMC Log FileIn the Install Dir \SFTmmc.logSet in Registry HKLM…\Softgrid\4.5\Management Console, add LogLevel Dword and set to 1Default is only errors will be logged

Page 54: Effectively and Efficiently Troubleshoot Application Virtualization

54

Sequencer Log Files Logs are stored in Insall Dir \logsSFT-Seq-log.txt

Majority of logging goes in this fileEverything that the seuqencer does goes in here (Uploads, downloads, Service starts / stops etc.)

SFTrbt.txt Reboot Log File Records actions during the reboot processing

SFTCallBack.txtLogs all Process starts and stops as seen by Systemguard

Page 55: Effectively and Efficiently Troubleshoot Application Virtualization

55

Sequencer Log Files cont.Filter.log

Recorded by Systemguard when any file activity occurs Must be dumped with Dumplog.exe

SFTrpc.txt Created by SFTRPC.EXE Contains Process starup and shutdownVerbose diag Info about each monitored shortcut

Page 56: Effectively and Efficiently Troubleshoot Application Virtualization

56

SCCM Log Files

VirtualApp.log Tracks virtual application registration and publishing

VAppLauncher.logTracks virtual application launch by user.

Page 57: Effectively and Efficiently Troubleshoot Application Virtualization

57

Tools and Techniques

Client Log Parser App-V Resource KitParses Log files and enable a comfortable way of anlysis

Examples:01 App-VClientLogParser.exe /P:c:\logs /O:c:\temp\errors.txt /LF /N:502 App-VClientLogParser /P:C:\logs /N:5 /M:2 /R /O:C:\results\error.txt

Page 58: Effectively and Efficiently Troubleshoot Application Virtualization

58

Pivot Tables With the Parsed Log Files you can create Pivot Tables

Examples:

Page 59: Effectively and Efficiently Troubleshoot Application Virtualization

59

Virtual Services

Three ways to disable virtual Services On the Sequencer, Tools – Options uncheck „Allow Virtualization of Service“ Machine Wide (debugging only) set „DisableVirtualServices“ dword 00000042 under HKLM\...Softgrid\4.5\Systemguard\Overrides Per Virtual Environment – add the following Tag to the OSD:

<VIRTUALENV> <POLICIES> <VIRTUAL_SERVICES_DISABLED>TRUE</VIRTUAL_SERVICES_DISABLED> </POLICIES>

Page 60: Effectively and Efficiently Troubleshoot Application Virtualization

60

Virtual Services cont.

Check SFTLDR.Log to verify that Virtual Services are disabled

You see OnSftLdrStart: -- Virtual Services Disabled –

Page 61: Effectively and Efficiently Troubleshoot Application Virtualization

61

Virtual File SystemTwo ways to disable it

Machine Wide set „ DisableVFS“ dword to 1 under HKLM\...Softgrid\4.5\Systemguard\Overrides OSD

<POLICIES><VIRTUAL_FILE_SYSTEM_DISABLED>TRUE</VIRTUAL_FILE_SYSTEM_DISABLED></POLICIES>

Page 62: Effectively and Efficiently Troubleshoot Application Virtualization

62

Virtual RegistryTwo Ways to disable it

Machine Wide set „ DisableVREG“ dword to 1 under HKLM\...Softgrid\4.5\Systemguard\Overrides OSD

<POLICIES><VIRTUAL_REGISTRY_DISABLED>TRUE</VIRTUAL_REGISTRY_DISABLED></POLICIES>

Page 63: Effectively and Efficiently Troubleshoot Application Virtualization

63

Local InteractionSet in the OSD

<POLICIES><LOCAL_INTERACTION_ALLOWED>TRUE</LOCAL_INTERACTION_ALLOWED></POLICIES>

Places COM Objects out of the Bubble into the OSIt‘s active for the whole PackageYou see a not in the SFTLDR.log if it‘s enabled

Page 64: Effectively and Efficiently Troubleshoot Application Virtualization

64

Process Monitor / Explorer

Process Monitor can look inside the BubbleWith 4.5 the Procmon Driver was modified Get input directly from the App-V Driver To enable it use /externalcaptureCaptures also Stack information

Process Explorer don‘t need a view in the Bubble Shows Tree View of start‘s and dependencies Also shows Handle informationStack Informations

Page 65: Effectively and Efficiently Troubleshoot Application Virtualization

App-V Error Codes

Page 66: Effectively and Efficiently Troubleshoot Application Virtualization

66

Additional Resources

Page 67: Effectively and Efficiently Troubleshoot Application Virtualization

67

Additional Resources - Blogs Official App-V Blog

http://blogs.technet.com/softgrid

Virtualworld Bloghttp://blogs.technet.com/virtualworld/

German App-V Bloghttp://blogs.msdn.com/sgern/

Page 68: Effectively and Efficiently Troubleshoot Application Virtualization

68

Additional Resources - Groups

App-V Guru (AppVirt)http://appvirtguru.com/

German SoftGrid and App-V User Grouphttp://www.dsgug.de/

Page 69: Effectively and Efficiently Troubleshoot Application Virtualization

69

Additional Resources - TechnetApp-V Tech Center

http://technet.microsoft.com/en-us/appvirtualization/default.aspx

Whitepapershttp://technet.microsoft.com/en-us/appvirtualization/cc843994.aspx

Page 70: Effectively and Efficiently Troubleshoot Application Virtualization

70

Appendix

Log Files:Which to useWhere to findWhen to useHow to enable and change log level

Page 71: Effectively and Efficiently Troubleshoot Application Virtualization

71

Scenario 1 – Deployment (Server)

Which: Server install log files SoftGrid-server-setup.txt MSI<random string>.txt (MSI*.txt)

Where: %TEMP%

When: Issues/messages during server installServer installed using setup.exe

SoftGrid-server-setup.txt, MSI*.txtServer installed using setup.msi

MSI*.txt

How: Generated by default (error logging only)For debugging, enable MSI logging (more MSI*.txt)

Page 72: Effectively and Efficiently Troubleshoot Application Virtualization

72

Scenario 2 – Adding Package, Importing AppsScenario 3 – Caring and Feeding

Which: Sft-server.txt

Where: %ProgramFiles%\Microsoft System Center App Virt Management Server\App Virt Management Server\ Server\logs

When: For any issues/messages after server is installed

How: Generated by default (log level 3)For debugging, change log level here: HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\SOFTGRID\4.5\SERVER\SOFTGRID_LOG_LEVELLog level range is 0-5 for Transactions, Fatal Errors, Errors, Warnings, Informational, and Verbose Restart the Management Server service for the new log level to take effectReset to default after troubleshooting to avoid overhead

Page 73: Effectively and Efficiently Troubleshoot Application Virtualization

73

Scenario 2 – Adding Package, Importing AppsScenario 3 – Care and Feeding

Which log file: sftlog.txt (client log)

Where: C:\ProgramData\Microsoft\Application Virtualization Client (or look for location in registry)

When: Validating server deployment through client interaction

Page 74: Effectively and Efficiently Troubleshoot Application Virtualization

74

Scenario 4 – Deployment (Client)Which:

MSI<random string>.txtNew log file for every install or upgrade

Where: %TEMP%

When: Issues/messages during client install/upgrade

How: Generated by default (error logging only)For debugging, enable MSI logging (more MSI*.txt)Date stamp on start and end of log

Information on product version, name, and install outcome at very end of log

Page 75: Effectively and Efficiently Troubleshoot Application Virtualization

75

Scenario 5 – Publishing Virtual Apps to Client

Which: sftlog.txt (client log)

Where: C:\ProgramData\Microsoft\Application Virtualization Client (or look for location in registry)

When: For any client error/message

How: Default log level: informationalLog location can be configured in registryLog level can be resetin Client MMC

Page 76: Effectively and Efficiently Troubleshoot Application Virtualization

76

Default MSI log v/s log with MSI logging enabled

Default log captures only error conditions and install outcome

MSI enabled log captures configuration details, start and end of each custom action, along with error message

DeploymentWhy Enable MSI Logging?

Page 77: Effectively and Efficiently Troubleshoot Application Virtualization

77

Publishing Virtual Apps to Client

Sftlog v/s Event logAt information log level, both provide similar detailsVerbose sftlog level required to troubleshoot complex issues

SftlogEvent log

Parse log data to review trendsUse Client log parser (resource kit tool) for sftlogUse Ops Manager for event log

Page 78: Effectively and Efficiently Troubleshoot Application Virtualization

78

Scenario 6 – Delivery of Virtual Apps to the Client

Which: Sftlist.log if streaming protocol is HTTP/SSftnta.txt if streaming protocol is RTSP/S

Where: Not generated by default, need to enableGenerated in client install pathLog file location cannot be changed

When: For errors/messages after launch starts and before it completes 100%

Page 79: Effectively and Efficiently Troubleshoot Application Virtualization

79

Scenario 6 – Delivery of Virtual Apps to the Client (contd.)

How:Enable/update log level for sftlist.log

HKEY_LOCAL_MACHINE\SOFTWARE\SoftGrid\4.5\Client\ConfigurationCreate Value Name: "TRAN" (dword)Value data: 0 to 6

Log level: 0-6: NEVER, 1; ALWAYS, 2; FATAL, 3; ERROR, 4; WARN, 5; INFO: VERBOSE

Enable/update log level for sftnta.txtHKEY_LOCAL_MACHINE\SOFTWARE\SoftGrid\4.5\Client\ConfigurationCreate Value Name: " NtaLogMask " (dword)Value data: Verbose level: FFFFFFFF, Info: 00030002, Error: 00020002, Off: 0

Restart the Application Virtualization Client Service (sftlist) for changes (enable/update) to take effect

Page 80: Effectively and Efficiently Troubleshoot Application Virtualization

Deployment – Issue #4

Issue: Error connecting to Management Service in management console - Error code: 0000C800 and 0000C824Investigation: Error message to user

Root Cause: Management Service we are attempting to connect to is not installed on the host machine; more info on root causes for C800 error at http://go.microsoft.com/fwlink/?LinkId=114648Resolution: Install management service on host machine

Page 81: Effectively and Efficiently Troubleshoot Application Virtualization

81

Scenario 1 – Server Deployment – Issue #5

Issue: Error code 0000C801 connecting to Management Service in management console

Investigation: Error message to user

Root Cause: Windows AuthenticationService not found

Resolution: Add role service in Server Manager for Windows Authentication

Page 82: Effectively and Efficiently Troubleshoot Application Virtualization

82

Scenario 1 – Deployment – Issue #6

Issue: Error code 0000C81B connecting to Management Service in management console

Investigation: Error message to user

Root Cause: ASP.net, which is used to load the Management web service, is not installed

Resolution: Add role service in Server Manager for ASP.net

Page 83: Effectively and Efficiently Troubleshoot Application Virtualization

83

Deployment – Summary of C800 Errors

Discussed error code: 0000C81B0000C8010000C8240000C800

It is strongly recommended you visit the following links:Error code: 0000C800 http://go.microsoft.com/fwlink/?LinkId=114648Error code: 0000C806 http://go.microsoft.com/fwlink/?LinkId=114647

Page 84: Effectively and Efficiently Troubleshoot Application Virtualization

84

Scenario 2 – Adding Package, Importing Apps

Demo Review Adding Package, Importing Apps

If you add a package first, then you also need to import appsIf you import apps first, then package is added automatically

Page 85: Effectively and Efficiently Troubleshoot Application Virtualization

Adding Package, Importing Apps – Issue #2

Issue: Apps successfully imported on server, publishing refresh successful on client, but some apps do not appear in client console

Investigation: Review sftlog.txt

Root cause: .osd path not set correctly

Note: During importing of app, OSD path set in this location on server gets inserted into the path to fetch .osd files; if .osd files do not exist in this location, apps will not get published to the client

Resolution: Ensure .osd path set in server ‘system options’ correctly represents the location of .osd files

Page 86: Effectively and Efficiently Troubleshoot Application Virtualization

86

Scenario 3 – Caring and Feeding – Issue #4

Issue: After server install, create a new App-V data store

Investigation/Root Cause: No out-of-box capability

Resolution:Uninstall and re-install server to create a new data store, orFollow manual steps using the white paper, ‘Creating a New Application Virtualization 4.5 Database Using SQL Scripting,’ found at http://technet.microsoft.com/en-us/appvirtualization/cc843994.aspx

Page 87: Effectively and Efficiently Troubleshoot Application Virtualization

87

Caring and Feeding – Issue #5

Issue: Server performance seems to be slow, or client requests are timing out

Investigation: Review sft-server.txt, sftlog.txt

Look at memory cap in Server MMC for server coreCompare memory cap with memory consumption by each server core (sghwsvr.exe)

Root Cause: Server file cache may have exceeded the maximum memory set

Resolution: Increase the Maximum Memory Allocation, restart service

Page 88: Effectively and Efficiently Troubleshoot Application Virtualization

88

Scenario 4: Deployment – Issue #2

Issue: Want to upgrade from App-V 4.5 using setup.msi, but don’t know what the pre-reqs are for App-V 4.6

Resolution: 1. Launch setup.exe

(in sandbox environment) – it will show the pre-reqs

2. Install the listed pre-reqs on client machine

Note: The Microsoft application error reporting pre-req can be found in Support\watson directory of media.

Page 89: Effectively and Efficiently Troubleshoot Application Virtualization

89

Scenario 6 – Delivery – Issue #3

Issue: Deleting an app from the client MMC does not remove it from the cache – the app appears to be removed from cache, but launching the app loads it from the cache v/s stream

Root cause: Misleading error message – delete does not remove app from cache, unload does

Resolution: Unload the app Unload will not remove app from the cache if there are other loaded apps in the package

Page 90: Effectively and Efficiently Troubleshoot Application Virtualization

90

Delivery – Issue #4

Issue: Unloading a package does not reduce the used cache size

Investigation (example):Current cache size (reserved cache size in client) – 5 GBUnload a package 3 GB in sizeCheck Reserved cache size – same as 5 GB, will not reduceLoad a package 1 GB in sizeCheck Reserved cache size – same as 5 GB, will not increase

Root Cause: Cache size cannot be reduced if you unload package, available cache can be reused by other virtual packages but it cannot be reclaimed by the client

Resolution: To reclaim the reserved cache: HKEY_LOCAL_MACHINE\SOFTWARE\SoftGrid\4.5\Client\AppFSSet State (dword)= 0, Reboot machineDrawback – All apps will be removed from cache and Reserved cache size will become ~0

Page 91: Effectively and Efficiently Troubleshoot Application Virtualization

91

Delivery – Issue #5

Issue: Error when changing (reducing) maximum cache size

Root Cause: Once set, maximum cache size cannot be reduced

Resolution: Reduce the set Maximum cache size: HKEY_LOCAL_MACHINE\SOFTWARE\SoftGrid\4.5\Client\AppFSSet File Size = new maximum cache size, State (dword)= 0Reboot

Page 92: Effectively and Efficiently Troubleshoot Application Virtualization

92

Delivery – Issue #6

Issue: ‘Could not connect to stream URL’ error to user

Investigation: Error message in sftlog – need to update log level to verbose

The package could not be locked in cache due to lack of unallocated spaceCould not set lock status to TRUE, could not load app Not enough space in the Application Virtualization cacheReport the following error code to your System Administrator – error code 4504B4-16D10E0A-0000E029

Root cause: Could not load app, as client cache is full Incorrect error message to user, correct error code in sftlog

Resolution: Remove apps from cache – unload in client MMCIncrease cache size – properties of 'Application Virtualization‘ in client MMC

Page 93: Effectively and Efficiently Troubleshoot Application Virtualization

93

Delivery – Issue #7

Issue: Cannot find/see available space in App-V client cache

Resolution: 2 options:1. (Max size – Reserved Cache size)2. In Performance Monitor tool, add

performance counter

“App Virt Client Cache”Create new data collector setAdd perf countersSelect log format ‘comma separated’

Page 94: Effectively and Efficiently Troubleshoot Application Virtualization

Delivery – Issue #2 (cont)SFT File Path is not Valid

Issue: Cannot stream app

Investigation: Review sftnta.txt/sftlist.txt, sftlog.txt

Root Cause: Invalid HREF for sft in .osd file %SFT_softgridserver% not set as an environment variable or policy ASR set incorrectly

Resolution: For an app that fails to launch, ensure Package URL and Source are accurate in app properties

Page 95: Effectively and Efficiently Troubleshoot Application Virtualization

95

www.msteched.com/Australia

Sessions On-Demand & Community

http:// technet.microsoft.com/en-au

Resources for IT Professionals

http://msdn.microsoft.com/en-au

Resources for Developers

www.microsoft.com/australia/learning

Microsoft Certification & Training Resources

Resources

Page 96: Effectively and Efficiently Troubleshoot Application Virtualization

© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED

OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.