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.
In general, the steps of WIM image capture are:
- Create a WinPE ISO image and copy it to a CD.
- Use Microsoft Sysprep to prepare a reference machine for capturing the WIM image.
- Capture the WIM image with ImageX.
This procedure describes capturing WIM images for deployment from a TrueSight 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
- Install and configure the provisioning infrastructure. See Setting-up-the-provisioning-environment.
Download and install the appropriate Windows kit:
- For WinPE 2.x, obtain the Microsoft Windows Automated Installation Kit (WAIK).
- For WinPE 5.1, obtain the Windows Assessment and Deployment Kit (ADK).
To capture a WIM image for use in provisioning
- Create a WinPE ISO image using the TrueSight Server Automation WinPE image creation process and copy the image to a CD. See Creating-WinPE-boot-image-files.
For more information about creating a bootable disk, see Microsoft TechNet: Walkthrough: Create a Bootable Windows PE RAM Disk on CD-ROM - Use Microsoft Sysprep to prepare a reference machine for capturing the WIM image.
- 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.
- Install additional applications. For example, on a virtual machine, you might install VMware tools.
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.inffile with the driver information.
For information about injecting mass storage drivers, see the Microsoft Technet articles on the following topics:
- "Sysprep Tools and Settings": http://technet.microsoft.com/en-us/library/cc785213(WS.10).aspx
- "Choosing Sysprep Settings": http://technet.microsoft.com/en-us/library/cc758953(WS.10).aspx
- To remove any unique information and reseal the operating system, run the Sysprep tool on the reference machine.
- Copy the Sysprep executable (sysprep.exe) to a directory on the reference machine. For example: C:\sysprep.
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.
- Capture the WIM image on the reference machine.
- 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.
- Boot from the CD with the WinPE ISO image you created.
- (For WinPE images created with TrueSight Server Automation) When the machine boots, press Ctrl+C to exit the bmi (bare metal interface) and display the Windows command prompt.
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 volumecommand).
diskpart
select disk 0
list volume
exit- 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 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"