Capturing WIM images for use in provisioning

To provision Microsoft Windows servers using a Windows image (WIM), you first must capture the image using Microsoft ImageX. This procedure gives the steps of WIM image capture and provides an example using a Microsoft Windows 2003 WIM image.


The ImageX command-line tool is deprecated in Windows 8. Use the DISM command-line tool.

 For more information, see the following articles:

In general, the steps of WIM image capture are:

  1. Create a WinPE ISO image and copy it to a CD.
  2. Use Microsoft Sysprep to prepare a reference machine for capturing the WIM image.
  3. Capture the WIM image with ImageX.

This procedure describes capturing WIM images for deployment from a BMC Server Automation Application Server on a Windows 2003 platform to target VMs on VMware workstation 7. You may need to change the procedure for Windows 2008 and specific hardware.

This procedure is not intended to provide comprehensive information about using the Sysprep and ImageX tools. For information about these tools, see the Microsoft Technet Library.

Before you begin

To capture a WIM image for use in provisioning

  1. Create a WinPE ISO image using the BMC Server Automation WinPE image creation process and copy the image to a CD. See Creating WinPE 2.0 and later boot image files.
    For more information about creating a bootable disk, see the following Microsoft Technet article:
  2. Use Microsoft Sysprep to prepare a reference machine for capturing the WIM image.
    1. Install the version of Windows on the machine that is to serve as the source for the WIM image. For example, you might install Windows 2003 on a virtual machine.
    2. Install additional applications. For example, on a virtual machine, you might install VMware tools.
    3. If the hardware on the target servers is not the same as on the reference machine, inject mass storage drivers during system preparation with Sysprep. Before you run Sysprep, populate the SysprepMassStorage section of the sysprep.inf file with the driver information.


      For images for Windows 2003 or Windows 2003 x64, include mass storage drivers in the image during creation.

      For information about injecting mass storage drivers, see the Microsoft Technet articles on the following topics:

  3. To remove any unique information and reseal the operating system, run the Sysprep tool on the reference machine.
    1. Copy the Sysprep executable (sysprep.exe) to a directory on the reference machine. For example: C:\sysprep.
    2. Change directory to the sysprep directory and run Sysprep. For example, for Windows 2003, you would enter: sysprep.exe /mini /reseal
      The system automatically shuts down.


      You may encounter issues with creating the WIM images using Microsoft Sysprep. For information about these issues, see the Microsoft knowledge base.

  4. Capture the WIM image on the reference machine.
    1. Configure the reference machine to boot from a CD. If the machine goes into HDD boot, it runs the mini-setup wizard and you have to run Sysprep again.
    2. Boot from the CD with the WinPE ISO image you created.
    3. (For WinPE images created with BMC Server Automation) When the machine boots, press Ctrl+C to exit the bmi (bare metal interface) and display the Windows command prompt.
    4. Start the Diskpart.exe utility and use the following commands to verify the disk configuration. Note the drive you are imaging (listed in the output of the list volume command).

      select disk 0
      list volume
    5. Mount the data store drive. Use the following Windows operating system command:
      net use driveLetter pathToDataStore /user:administratorUser password
      For example: net use k: \\serverA\pxestore /user:Administrator adminpwd
    6. Use ImageX to capture the WIM image from the drive. Use the format:
      imagex /capture driveToCapture wimImagePathAndName "wimImageName"
      For example, this command creates a Windows 2003 Standard WIM image (W2K3STDx86.wim) in the WimImages directory in the data store:
      imagex /capture C: k:\WimImages\W2K3STDx86.wim "Windows 2003 Standard"


      You might need to relicense applications bundled in the WIM image if they use the host name, MAC address, or some other unique key.


BMC Server Automation does not allow to create a 100MB partition for C: or the reserve partition.

Was this page helpful? Yes No Submitting... Thank you