Tuesday, June 12, 2012

Merge .WIM files and import into ConfigMgr 2007 can be adapted to 2012


Scope

One largely overlooked areas of images imported into ConfigMgr is the fact that WIM files are actually single instance stores.  You can merge several WIM files together and once merged take up considerable less disk space than storing and importing them as separate files.  Capturing a single Windows 7 SP1 image with nothing but the OS takes up ~3GB for each x86 and x64.  If we merge the WIM files together we can save ~2.5GB. When merged the single instance store goes into effect and the WIM only saves the differences between the two images.  If you have several images for each OS I would combine them all into a single WIM.  **You can do this for combining multiple OS’s into a single WIM and save more space but I find it easier to manage on a per OS basis or per team like put all Client OS’s together and all Server OS’s together.   Below are the steps to merge the WIM’s, import them into ConfigMgr, and update the deployment Task Sequence.

Prerequisites

Windows Automated Installation Kit (WAIK)
ConfigMgr

Process

WIM file merge

1.       Install the WAIK on your workstation or you can run it from the ConfigMgr server
2.       Capture your image using a ConfigMgr Task Sequence and store the WIM on a network share
3.       Copy the WIM file to the machine that has the WAIK installed
4.       Open the Deployment Tools Command Prompt as an Administrator:
a.       Click Start à Programs à Microsoft Windows AIK
b.      Launch Deployment Tools Command Prompt (launch as an Administrator)
5.       Navigate to the location of your WIM file you copied earlier
6.       Run Imagex.exe /info <WIMFileName>.wim
7.       This will give you all the editions and partitions of your captured image
a.       The key areas to look for are the <Image Index = “”> and the <Name> area below it.  Take note of which index has the OS information.  **There may only be 1 index.
8.       Once you have made note of which index file you want you will need to extract it into a new WIM file.  This new WIM file will be the one we import into ConfigMgr as our new Operating System Image
9.       Run imagex.exe /export <WIMFileName>.wim <Image Index> <NewWIMFileName>.wim “<Name of the Image Index>” /compress maximum
a.       Sample:  imagex.exe /export windows7.wim 1 sccmwin7import.wim “Windows 7 SP1 x86” /compress maximum
b.      Whatever you put in for <Name of the Image Index> is what you will see when you go to select your OS as part of your Task Sequence.  **Make sure it is as descriptive as you need it to be
10.   You can do steps 6-9 on as many WIM files you need to.  Just make sure you keep the <NewWIMFileName>.wim the same for each WIM you need to merge together.
11.   Once you have completed merging your WIM files check to see they are imported correctly
12.   If you run Run Imagex.exe /info <NewWIMFileName>.wim you should see multiple <Image Index> numbers with multiple descriptive <Name> fields below them
13.   Copy the <NewWIMFileName>.wim to a network location where you wish to keep your Operating System Image WIM Files

Import the New WIM in ConfigMgr

1.       Launch the ConfigMgr Console
2.       Navigate to Site Database (Site)\Computer Management\Operating System Deployment\Operating System Images
3.       Right Click Operating System Images and select Add Operating System Image
a.       Browse to the network path you saved your <NewWIMFileName>.wim
                                                               i.      Click Next
b.      Give your new OS Image a Name:, Version:, and Comment:
                                                               i.      Click Next
c.       Summary: Click Next
d.      Confirmation: Click Finish
4.       Right Click  your new Operating System Image and select Manage Distribution Points
a.       Welcome:
                                                               i.      Click Next
b.      Select Destination Distribution Point:
                                                               i.      Copy the package to new distribution points
                                                             ii.      Click Next
c.       Package:
                                                               i.      Select all of your distribution points that you wish to store the new Image file
                                                             ii.      **Do not need to store them on the SMSPXEIMAGES$ distribution points
                                                            iii.      Click Next
d.      Completion:
                                                               i.      Click Next
e.      Confirmation:
                                                               i.      Click Finish

Update Task Sequence

1.       Navigate to Site Database (Site)\Computer Management\Operating System Deployment\Task Sequences
2.       Right Click the Task Sequence you wish to update with the new Operating System Image and select Edit
a.       Go to the Apply Operating System Image step of the task sequence
                                                               i.      Ensure Apply operating system from a captured image is selected and click Browse
                                                             ii.      Choose your new Operating System Image
1.       It should now be shown in the Image Package: field
                                                            iii.      In the Image: field choose the name you gave for the <Name of the Image Index> you specified above. 
1.       You should see multiple Image: names if you merged the wim files properly in the previous steps.
3.       If your image deploys successfully for each WIM you merged, you can clean up any old Operating System Images and regain the disk space.

1 comment:

  1. Awesome instructions. Walked me through exactly what I needed very quickly. This is a must have if you work in SCCM alot.

    ReplyDelete