Wednesday, April 26, 2017

Offline Servicing is broken 0x800f082f

I was at a new customers site this week performing an assessment of their environment. Their biggest problem was patching and everything that comes with it. These were things as broken ADRs, dozens of empty SUGs, failed packages, etc. The environment was actually behind several years of patching and it was unknown to customer until my arrival. Even the latest image at the customers site which was less than 2 months old was out of date several years on patches. It was determined at customers request that we address the patch compliance situation by re-imaging all the machines as I pointed out to them that nearly 25% of the environment has been re imaged in the last 3 months. Instead of building a fresh new image I turned to offline servicing to update the Win 7 image as a quick solution while I focus on other projects.

It is important that you approve/download all CBS patches for the image you are intending on updating. If this is not approved when you attempt to schedule updates via offline servicing nothing new will be found. This was the problem at the customers site where the broken ADR was not downloading the required products. Once the patches were approved we was able to see over 100 patches could be add to the WIM in the screenshot below




The process of offline servicing basically takes your selected wim and creates a backup copy. Next the selected patches will be download to a key location and then DISM into the WIM. Once this completes successfully we would expect to see a larger sized wim and a backup copy of our original WIM

On the site server we can see the folder being created “ConfigMgr_OffineImageServicing” with the image (MOC00BE8) and individual GUIDs. At this point everything looks to be fine in the beginning of the process. 

We can track this process from start to finish in the “OfflineServicingMgr.Log” located on the primary server.


We are only starting to see failures when trying to inject patches. 

 OfflineServicingMgr.LOG
“InstallUpdate returned code 0x800f082f
Failed to install update with ID 17242935 on the image. ErrorCode = 2095”



For these errors I recommend taking the steps below to the existing WIM or creating a copy of the WIM. 
  1. Manually mount the image via DISM.
  2. Load the registry software key (from the image) onto your local system
  3.  Find Registry Key HKLM\MyKey\Microsoft\Windows\CurrentVersion\Component Based Servicing\SessionsPending and set the “Exclusive” REG_DWORD value to “0”
  4. Unload the registry
  5. Commit changes to the WIM
  6. Reimport the WIm and perform offline servicing again


Below you will see that I ran an elevated command prompt to successfully mounted the image.
                 “DISM /Mount-Wim /WimFile:C:\Users\H93-extra\Desktop\20170424\V4.2_MRO_Win7_ENT_SP1_x64.wim /Index:1 /MountDir:C:\Users\H93-extra\Desktop\Mount”'

Next we need to load the registry key from the mounted WIM onto our local system.
               
  “Reg Load HKLM\Mykey C:\Users\H93-Extra\Desktop\Mount\Windows\System32\Config\Software”

When we launch Regedit on our local system we see “MyKey” located in our HKLM on our local system. 



From here we need to expand to HKLM\MyKey\Microsoft\Windows\CurrentVersion\Component Based Servicing\Session Pending and verify what value is set on “Exclusive”




We see the value is currently set to “3” when it should be set to “0”.  When changing it we discover we have permissions issues below.


We need to take ownership of the key, assigning full control, and making it inheritable to all child objects. That would be too much for me to edit out of the screenshot so just pretend it is below.


We are now able to set the value to “0”
We can now unload the registry, and verify it is unloaded

“Reg unload HKLM\Mykey”




Now that is verified to be unloaded we can then go ahead and unmount the WIM. 
“DISM /UnMount-Wim /MountDir:C:\Users\H93-extra\Desktop\Mount /Commit”




Whenever I manually modify the WIM i tend to compare the size of it. We can see below the slight change in size from our changes. 


The new image is now renamed and imported into SCCM and we begin offline servicing. There are no errors to be seen in the “OfflineServicingMgr.Log”


This actually successfully finishes and we can see the new size of the WIM has grown by 1.2 GB. 


On the WIM we can see that there are over 100 security patches added to the WIM.
Now there are no more X64 updates available as the image is completely patched and ready for testing.We  now are able to image new systems that are fully patched





Link source : http://sccmf12twice.blogspot.hk/2017/04/offline-servicing-is-broken-0x800f082f.html?spref=fb

No comments:

Post a Comment