Date post: | 31-Mar-2015 |
Category: |
Documents |
Upload: | charles-dutt |
View: | 217 times |
Download: | 1 times |
Effectively Debugging Complex Application SequencingsKaran DhillonSenior Test LeadMicrosoft Corporation
SESSION CODE: VIR321
Session Objectives And Takeaways
What will not be coveredHow to Sequence an application
What will be coveredHow to diagnose and repair common sequencing challengesLearn how to use procmon for troubleshooting SequencingsMost apps can be sequenced successfully
Best Practices
Know how to install and run the applicationCreate a recipeStart from a clean VM or system image
Revert to clean baseline before sequencingEnterprise image for clientCreate a Q:\ driveUse 8.3 name for package rootConfigure and test the app in the Install Phase
Best Practices
Reserve free space (3x Application size) Adding memory can also help improve sequencing timesDisable Virus Scanners, Defender, Indexing, Microsoft Update during sequencingCreate a dummy ODBC entryCreate a dummy printer entry
Common Sequencing Challenges
Missing filesUnsupported subsystemsInteraction between virtual and native appsSxSDynamic Suite Composition (DSC)
Process MonitorLearning The Tool
Process Monitor
What is it?An advanced monitoring tool for Windows
File systemRegistryNetworkProcess and thread
Where do I get it?Windows Sysinternals on Microsoft TechNetBing “procmon”
Learn more at Mark Russinovich’s technet blog
Virtual Environment Architecture
Virtual Environment
Virtual Application
Virtual Environment
Virtual Application
Virtual Environment
Virtual Application
Operating System
Process MonitorApp-V Integration
procmon /ExternalCapture /NoConnect /BackingFile install.pml
Interface with App-V virtual environment
Do not monitor events on startup
Save events to the PML file
Works with App-V 4.5 and 4.6
Process MonitorWorkflow
Start Procmon
MonitorAction
Stop Procmon
Analyze Results
Process Monitor – Gotcha
Process Monitor – Gotcha
Click Unblock
Missing FilesUnsupported Subsystems
Troubleshooting Netmon Sequencing
Sequencing Netmon
Karan DhillonTest LeadMicrosoft
DEMO
Missing Files
ExampleVFS Exclusion results in application failure on client
DetectionDialogs from the applicationProcmon analysis
RepairModify VFS Exclusion list and re-sequence
Sequencing ProcessExclusion Items
Excluder ClassifierParser
MonitoredData SFT
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
ExampleNetmon installs NM3.sysCOM+DCOM
DetectionDialogs from the applicationApplication knowledgeProcmon analysis
RepairDeploy subsystem out of band on client machinesGuidance for .NET on TechNet
Translucent(Merge, Virtual)
Merge with Local Data
Opaque(Override, Pure Virtual)
Mask Local Data
Reg/FileOpacity
Did registry keyor file path already
exist?
End
No Yes
Sequencing ProcessOpacity
Interaction Between Virtual and Native Apps
Troubleshooting PuTTY Web Site Shortcut
Troubleshooting PuTTY
Karan DhillonTest LeadMicrosoft
DEMO
Interaction Between Virtual and Native Apps
ExampleLaunch of PuTTY website URL launches and exits on clientExisting IE process does not have access to Q: drive
DetectionProcmon analysisVirtual environment policies
RepairModify OSD to launch separate IE process
Putty Website ShortcutOriginal 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"/>
Virtual Environment Policies
•Relaxes isolation for virtual app•Useful when virtual applications need to interact with locally installed applications.
LOCAL_ INTERACTION_
ALLOWEDPolicy
•VIRTUAL_SERVICES_DISABLED•VIRTUAL_REGISTRY_DISABLED
•VIRTUAL_FILE_SYSTEM_DISABLED
Debugging Policies
Exploring SxSTroubleshooting 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
DetectionApplication error message Event logssxstrace
RepairLocal install of runtimes
SxSTrace
Available starting on VistaFrom an elevated command prompt:
start sxstrace trace –logfile:vs.etlRun app that uses sxsHit Enter in sxstrace window to stopsxstrace parse -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
IMS Plug-in
Primary: Microsoft Office 2007
Secondary: IMS Plug-in
Word Fails to Launch
Launches on SequencerFails to launch on App-V Client
Procmon Analysis
Procmon Analysis
Process Name
Operation Path Result
WINWORD.EXE RegQueryValue HKCR\CLSID\{46D1D082-1C4A-11D4-B46D-0060089D5D78}\InProcServer32\(Default)
SUCCESS Data: C:\PROGRA~1\COMMON~1\IMAGIC~1\WORDCO~1.DLL
…
WINWORD.EXE CreateFile C:\PROGRA~1\COMMON~1\IMAGIC~1\WORDCO~1.DLL
PATH NOT FOUND
Procmon Forensic Evidence
Word Fails to Launch
Creating the virtual environment
Word
IMS Plug-in
Settings
Primary: Microsoft Office 2007
Secondary: IMS Plug-in
Shared Settings
Word Fails to Launch
WorkaroundUpdate
HKCR\CLSID\{46D1D082-1C4A-11D4-B46D-0060089D5D78}\InProcServer32\(Default)
With%CSIDL_PROGRAM_FILES_COMMON%\Imagic Shared\WordControlDeu.dll
DSC
ExamplesApp fails to launch
DetectionProcmon analysis
RepairRemove short path names from secondary packagesCopy environment variables and scripts to primary package
Summary
Most apps can be sequenced successfullyProcmon for troubleshootingCommon sequencing challenges
Attachmate Reflection and App-V
Native support of Reflection in App-V formatReflection 2011 Recipe published on TechNetLimited quantity of USB drives in Attachmate boothUSB drives contain Reflection 2011 in native App-V format (.sft)
Virtualization Track ResourcesStay 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
SessionsVIR209 - Microsoft Application Virtualization 4.6 and Microsoft Office 2010VIR11-INT - Top Customer Scenarios and an End-to-End Review of Microsoft Application Virtualization (App-V)VIR320 - Sequencing Deep Dive: Efficiently Making Your Applications VirtualVIR10-INT - When Things Go Wrong: How to Effectively and Efficiently Troubleshoot App-V Deployments
ResourcesMicrosoft Application Virtualization 4.6 Sequencing Guide
http://technet.microsoft.com/en-us/appvirtualization/cc843994.aspx
Complete an evaluation on CommNet and enter to win!
Resources
www.microsoft.com/teched
Sessions On-Demand & Community Microsoft Certification & Training Resources
Resources for IT Professionals Resources for Developers
www.microsoft.com/learning
http://microsoft.com/technet http://microsoft.com/msdn
Learning
© 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.
JUNE 7-10, 2010 | NEW ORLEANS, LA