450 likes | 630 Views
SESSION CODE: VIR321. Effectively Debugging Complex Application Sequencings. Karan Dhillon Senior Test Lead Microsoft Corporation. Session Objectives And Takeaways. What will not be covered How to Sequence an application What will be covered
E N D
SESSION CODE: VIR321 Effectively Debugging Complex Application Sequencings Karan Dhillon Senior Test Lead Microsoft Corporation
Session Objectives And Takeaways • What will not be covered • How to Sequence an application • What will be covered • How to diagnose and repair common sequencing challenges • Learn how to use procmon for troubleshooting Sequencings • Most apps can be sequenced successfully
Best Practices • Know how to install and run the application • Create a recipe • Start from a clean VM or system image • Revert to clean baseline before sequencing • Enterprise image for client • Create a Q:\ drive • Use 8.3 name for package root • Configure and test the app in the Install Phase
Best Practices • Reserve free space (3x Application size) • Adding memory can also help improve sequencing times • Disable Virus Scanners, Defender, Indexing, Microsoft Update during sequencing • Create a dummy ODBC entry • Create a dummy printer entry
Common Sequencing Challenges • Missing files • Unsupported subsystems • Interaction between virtual and native apps • SxS • Dynamic Suite Composition (DSC)
Process Monitor Learning The Tool
Process Monitor • What is it? • An advanced monitoring tool for Windows • File system • Registry • Network • Process and thread • Where do I get it? • Windows Sysinternals on Microsoft TechNet • Bing “procmon” • Learn more at Mark Russinovich’stechnet blog
Operating System Virtual Environment Architecture
Process MonitorApp-V Integration Works with App-V 4.5 and 4.6 procmon /ExternalCapture/NoConnect /BackingFileinstall.pml Interface with App-V virtual environment Do not monitor events on startup Save events to the PML file
Process Monitor – Gotcha Click Unblock
Missing FilesUnsupported Subsystems Troubleshooting Netmon Sequencing
Sequencing Netmon Karan DhillonTest LeadMicrosoft DEMO
Missing Files • Example • VFS Exclusion results in application failure on client • Detection • Dialogs from the application • Procmon analysis • Repair • Modify VFS Exclusion list and re-sequence
Sequencing ProcessExclusion Items Monitored Data SFT Parser Excluder Classifier Demo-PC→ %COMPUTERNAME% C:\Windows → %CSIDL_WINDOWS% Q:\LiveMtg\→ %SFT_MNT%\LiveMtg\ C:\Users\Demo\ → %USERPROFILE% … %CSIDL_INTERNET_CACHE% %CSIDL_LOCAL_APPDATA% C:\$Recycle.Bin\ … %COMPUTERNAME% → App %CSIDL_WINDOWS% → App %SFT_MNT%\LiveMtg\→ App %USERPROFILE% → User …
Unsupported Subsystems • Example • Netmon installs NM3.sys • COM+ • DCOM • Detection • Dialogs from the application • Application knowledge • Procmon analysis • Repair • Deploy subsystem out of band on client machines • Guidance for .NET on TechNet
Sequencing ProcessOpacity Reg/File Opacity Did registry key or file path already exist? No Yes Opaque (Override, Pure Virtual) Mask Local Data Translucent (Merge, Virtual) Merge with Local Data End
Interaction Between Virtual and Native Apps Troubleshooting PuTTY Web Site Shortcut
Troubleshooting PuTTY Karan DhillonTest LeadMicrosoft DEMO
Interaction Between Virtual and Native Apps • Example • Launch of PuTTY website URL launches and exits on client • Existing IE process does not have access to Q: drive • Detection • Procmon analysis • Virtual environment policies • Repair • Modify OSD to launch separate IE process
Putty Website Shortcut • Original OSD <CODEBASE HREF="FILE://C:\PUTTY\PUTTY_2.sft" GUID="36C0C5C3-D0BD-4C1E-A918-2684BBD5963B" PARAMETERS="" FILENAME="%SFT_MNT%\PTTY\website.url" SYSGUARDFILE="PTTY\osguard.cp" SIZE="3575538"/> • Modified OSD <CODEBASE HREF="FILE://C:\PUTTY\PUTTY_2.sft" GUID="36C0C5C3-D0BD-4C1E-A918-2684BBD5963B" PARAMETERS="%SFT_MNT%\PTTY\website.url" FILENAME="%PROGRAMFILES%\Internet Explorer\iexplore.exe" SYSGUARDFILE="PTTY\osguard.cp" SIZE="3575538"/>
Exploring SxS Troubleshooting Visual Studio SxS
Troubleshooting Visual Studio SxS Karan DhillonTest LeadMicrosoft DEMO
Exploring SxS • Trying to run a simple program from streamed Visual Studio 2008
Exploring SxS • Detection • Application error message • Event logs • sxstrace • Repair • Local install of runtimes
SxSTrace • Available starting on Vista • From an elevated command prompt: • start sxstrace trace –logfile:vs.etl • Run app that uses sxs • Hit Enter in sxstrace window to stop • sxstraceparse -logfile:vs.etl-outfile:vs.txt
SxSTrace Results • Need to install VC library locally INFO: Resolving reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8". … INFO: Resolving reference for ProcessorArchitecture WOW64. … ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8". ERROR: Activation Context generation failed.
Dynamic Suite Composition (DSC) Word Fails to Launch
Word Fails to Launch • DSC Scenario
Word Fails to Launch • Launches on Sequencer • Fails to launch on App-V Client
Procmon Analysis • Procmon Forensic Evidence
Word Fails to Launch • Creating the virtual environment
Word Fails to Launch • Workaround • Update • HKCR\CLSID\{46D1D082-1C4A-11D4-B46D-0060089D5D78}\InProcServer32\(Default) • With • %CSIDL_PROGRAM_FILES_COMMON%\Imagic Shared\WordControlDeu.dll
DSC • Examples • App fails to launch • Detection • Procmon analysis • Repair • Remove short path names from secondary packages • Copy environment variables and scripts to primary package
Summary • Most apps can be sequenced successfully • Procmon for troubleshooting • Common sequencing challenges
Attachmate Reflection and App-V • Native support of Reflection in App-V format • Reflection 2011 Recipe published on TechNet • Limited quantity of USB drives in Attachmate booth • USB drives contain Reflection 2011 in native App-V format (.sft)
Virtualization Track Resources • Stay tuned into virtualization at TechEd NA 2010 by visiting our event website, Facebook and Twitter pages. Don’t forget to visit the Virtualization TLC area (orange section) to see product demos, speak with experts and sign up for promotional giveaways. • www.Microsoft.com/Virtualization/Events • www.Facebook.com/Microsoft.Virtualization • Twitter.com/MS_Virt • Like this session? Write a blog on 2 key learning's from this session and send it to #TE_VIR and you could win a Lenovo IdeaPad™ S10-3 with Windows 7 Netbook! Review the rules on our event website: Microsoft.com/Virtualization/Events
Related Content • Sessions • VIR209 - Microsoft Application Virtualization 4.6 and Microsoft Office 2010 • VIR11-INT - Top Customer Scenarios and an End-to-End Review of Microsoft Application Virtualization (App-V) • VIR320 - Sequencing Deep Dive: Efficiently Making Your Applications Virtual • VIR10-INT - When Things Go Wrong: How to Effectively and Efficiently Troubleshoot App-V Deployments • Resources • Microsoft Application Virtualization 4.6 Sequencing Guide • http://technet.microsoft.com/en-us/appvirtualization/cc843994.aspx
Resources Learning • Sessions On-Demand & Community • Microsoft Certification & Training Resources www.microsoft.com/teched www.microsoft.com/learning • Resources for IT Professionals • Resources for Developers • http://microsoft.com/technet • http://microsoft.com/msdn
© 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.