Configure SCCM Task sequence Pre-Cache Content – Part 1

3
SCCM Task sequence Pre-Cache Content

For Bulk application change or Operating system upgrade we use task sequence. User start the Task sequence from SCCM Software center and waits for content download. This delay always impacts end user self-service experience with SCCM software center. Microsoft solution to this is “SCCM Task sequence Pre-Cache Content”. This feature is available starting with SCCM CB 1702. With Task sequence Pre-Caching feature enabled, installation completes faster. Because, contents required for the installation is already cached on local hard disk.

This is a series of posts as listed below:

  1. How to Configure SCCM Task sequence Pre-Cache Content Part 1
  2. Reporting of SCCM Task sequence Pre-Cache Content – Part 2
In this post, I will describe: -
Server Side - SCCM Task sequence Pre-Cache Content benefits
Server Side - How to configure SCCM Task sequence Pre-Cache Content
Client Side - How SCCM Task sequence Pre-Cache Content works
Console - End Result for SCCM Administrator

Benefits with SCCM Task sequence Pre-Cache Content:

#1 - Reduce Task sequence run time.
#2 - Allows you to pre-cache SCCM package contents during off business hours. 
We can schedule deployment as available during night and allow at least 4 hr. 
for the pre-caching process to complete.
Note 1: Task sequence Pre-Caching feature works only for deployments configured 
as “available”. 
Note 2: Pre-Caching feature start caching contents once deployment available start date/time reach.

How to Enable SCCM Task sequence Pre-Cache Content?

 Follow below steps to enable the feature.
  • Navigate to Administration > Updates and Servicing > “Features” node of the console. Right click on “Task Sequence content Pre-Caching feature”.
  • Select “Turn On”. Confirm by selecting “Yes”. If Turn On option is not enabled on your console then, you need to enable “Consent to use Pre-Release features

enable Task Sequence content Pre-Caching feature

  • After enabling the Feature and this change replicate to all site hierarchy servers.You can verify smsdbmon.log.
  • CM_UpdateFeaturesStatus” SQL table updated.
Modified trigger definition for Hierarchy Manager (CFD)[CM_UpdateFeaturesStatus_INS_UPD_HMAN]: table CM_UpdateFeaturesStatus(FeatureGuid) on insert,update, file CMF in dir C:\Program Files\Microsoft Configuration Manager\inboxes\hman.box\CFD\

CM_UpdateFeaturesStatus

  • After installing the feature, re-open the SCCM console.
  • Right click Task sequence deployment and select properties.

Task sequence deployment properties

  • Enable check box “Pre-download content for this tasks sequence”.

enable Pre-download content for this tasks sequence

Key notes:

  • Pre-cache feature download all package contents referenced in the task sequence with an exception for the OS upgrade step. We will talk about this exception later part of the post.

Example : Task sequence have 10 different driver packages to handle 10 hardware models. Each Task sequence step is configured to install driver based on hardware model condition. Pre-cache feature download all driver packages even though all driver packages are not applicable for the system. Because the condition configured in each task sequence step gets evaluated only at run time.

  • Conditional pre-download is available only for OS upgrade step. Pre-cache feature downloads OS upgrade package only if below condition is true. The condition can be based on 2 values (architectures and language ) at the time of writing this post. In future SCCM release we can expect more supported conditions for Task sequence pre-cache feature.
Pre-download WMI Condition Example:
(Select * from Win32_OperatingSystem where Locale = '0409' and OSArchitecture = '32-bit')

Pre-download WMI Condition Example

  • If User start the TS before all contents are pre-cached. TS will not wait for all contents to pre-cache. TS will fall back to any of the 2 deployment option configured in your deployment as shown below. So, it’s important to allow at least 5 hr. for all the contents to get pre-cached once Task sequence is available for user.

deployment option

How SCCM Task sequence Pre-Cache Content works ?

Lets analyze SCCM client component workflow to pre-cache content by following logs.

  • Verify policyagent.log to confirm whether deployment policy received by computer.
  • Search task sequence deployment ID in policyagent.log
Download of policy CCM_Policy_Policy5.PolicyID="DEP-CHQ20001-CHQ00001-6F6BCC28",PolicySource="SMS:CHQ",PolicyVersion="1.00" completed DTS Job ID:{91696C9D-FB85-4BD8-B163-E20475B3C8F7}

policyagent.log

  • Review the log datatransferservice.log to confirm DTS Job completion.

datatransferservice.log

  • Once above DTS job completes then Content access service(CAS) start request to pre cache package contents.
  • Content access service(CAS) verify whether SCCM cache have enough space to accommodate the package download. SCCM client cache size should be able to accommodate the content.
Received request for content CH000001.1, size(KB) 121237, under context System with priority Low. ContentAccess 1/11/2018 1:08:51 PM
CacheManager: There are currently 0 bytes used for cached content items (1 total, 0 active, 1 tombstoned, 0 expired). ContentAccess 1/11/20181:08:51 PM
CacheManager: Grooming cache, target free space size is 124146688 bytes, allow deletion of active items = 'FALSE'... ContentAccess 1/11/20181:08:51 PM
CacheManager: There are currently 0 bytes used for cached content items (1 total, 0 active, 1 tombstoned, 0 expired). ContentAccess 1/11/20181:08:51 PM
CacheManager: Goal free space size for groom operation is 124146688 bytes. cache already has 5368709120 bytes

Content access service (CAS)

  • Location services component will request for Distribution point list. You can verify this activity in locationservices.log
  • LocationServices component provided the Distribution point list for each packages
Distribution Point:'http://CM1.corp.contoso.com/SMS_DP_SMSPKGS/CHQOOOOS', Locality...
Calling back with the following distribution points
Distribution Point='http://CM1.corp.contoso.com/SMS_DP_SMSPKGS/CHQDOOOB‘, Locality...
Calling back with locations for location request {0C09FC2C-E964-4F79-87AA-6CE6816FA782}
Calling back with locations for location request {EBZ8A68C-C80D-4817-9A21 -EB4EC017C1 53}

Content access service (CAS.log)

  • ContentTranferManger component will start downloading the contents from the Distribution points list as shown below.
  • Monitor ContentTransferManger.log to track CTM job status.
CTM job {78BC2A66-C473-4AED-8D86-ZD37D89FDAD9} entered phase CCM_DOWNLOADSTATUS_PREPARING_DOWNLOAD
CTM job {CC8C1 B1 F- E322-4C36-8ABD-9AE51 6FBDEC} entered phase CCM_DOWNLOADSTATUS_PREPARING_DOWNLOAD
CTM job {783C2A66-C473-4AED-8D86-2D37D89FDAD9} entered phase CCM_DOWNLOADSTATUS_DOWNLOADING_DATA
CTMjob {CC8C1 B1 F-E322-4C36-8ABD-9AE516F8D1EC} entered phase CCM_DOWNLOADSTATS_DOWNLOADING_DATA
CTM job {FFBDBOZD-5E70-4F7E-947F-C9ASF2A95019} entered phase CCM_DOWNLOADSTATUS_REPARING_DOWNLOAD
CTMjob {FFBDBOZD-5E70-4F7E-947F-C9A5F2A95019} entered phase CCM_DOWNLOADSTATUS_DOWNLOADING_DATA
CTM job {4BC9808F-1ACF-4AE8-A73C-B9FBOS1 AED9E} successfully processed download completion.
CTM job {788C2A66-C47B-4AED-8D86-2D37D89FDAD9} successfully processed download completion.
CTM job {CC8C1 B1 F-E322-4C36-8ABD-9AE516F8D1EC} successfully processed download completion.
CTM job {FFBDBOZD-5E70-4F7E-947F-C9A5F2A95019} successfully processed download completion.

ContentTransferManger.log

  • You can keep an eye on datatransfer.log in parallel. You can see the HTTP URL’s accessed by the ContenTranferManager to download each files in the package from the Distribution point.
UpdateURLWithTransportSettings():NEWURL-http:/cm 1.corp.contoso.com:80/SMS_DP_SMSPKGS/CHQ00002/sccm?/scepinstall.exe
UpdateURLWithTransportSettings():OLDURL-http://cm1 .corp.contoso.com/SMS_DP_SMSPKG$/CHQ00002/sccm?/wimgapi.msi
UpdateURLWithTransportSettings():NEWURLhttp://cm 1.corp.contoso.com:80/SMS_DP_SMSPKG$/CHQ00002/seem?/wimgapi.msi
UpdateURLWithTransportSettings():OLDURL-http://cm1.corp.contoso.com/SMS_DP_SMSPKG$/CHQ00002/sccm?/x64
UpdateURLWithTransportSettingsQ:NEWURL-http://cm 1.corp.contoso.com:80/SMS_DP_SMSPKG$/CHQ00002/sccm?/x64

datatransfer.log

  • DataTransferManager marked as complete.
  • Content transfer manager (CTM job ) marked as complete
  • Finally, CAS verifies the Hash value for the downloaded package.
DTSJob {825979A2-ADD1-4A6A-A75ACFFSF91FC) in state 'Retrieved Data'.
DTSJob {82597'1A2-ADD 1-4A6A-A546-75ACFFlfF91FC} successfully completed download.
DTSJob {825979A2-ADD·1-4A6A-A 75ACFf BF91 FC} in state 'NotifiedComplete'.
CTMJob {CC8C1B1F-E322-4C36-8ABD-9AE516F8D1EC} successfully processed download completion.
DTSjob {B25979A2-ADD1-4AeA-A545-7SACFF8F91FC} has completed:Status :SUCCESS
Download completed for content CHQ00002 under context System
Hash verification succeeded for content CHQ00002.2 C\Windows\ccmache\3 
CacheManager: ADD new caehe entry for id:CHQ00002 Version :2 Size :217159K RefCount:l LartRef Minutes : 0

CAS.log Hash value verification

Result for SCCM Administrator:

  • 4 Packages cached which referenced in the task sequence as shown below.
  • User is yet to start the Task sequence from Software center.

Pre-cached task sequence

  • At the time of writing this post, there is no SCCM native feature to find Task sequence pre-caching status. In my second blog post 2 we will see how to achieve this.

3 COMMENTS

  1. Hi, thanks for the post. It is great article!
    I was really surprised that all packages already presented in th ccmcache folder. It is really nice.
    I have a question:
    If package already presented in the cache folder, I`ve changed one of them .Is package going to be updated before installing?

    • I didnt tested that scenario.
      But i think it will download again.Each SCCM Package have a hash value associated.SCCM client will download new content if it observe any mismatch with the cached content and the actual source.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.