Datasheet
17
Optimizing Your Deployment Image
CrOssrEf You learn more about managing updates in Chapter 15, “Patch
Management with WSUS.”
Applying a WIM to a VHD
You can use the ImageX.exe utility to apply a WIM image that you have prepared to a
VHD le and then allow the computer to boot to that VHD le.
To create a VHD le and apply a prepared WIM le to the VHD, perform the follow-
ing steps:
diskpart.exe
create vdisk file=c:\win2k8r2.vhd maximum=30000 type=fixed
select vdisk file=c:\win2k8r2.vhd
attach vdisk
create partition primary
assign letter=v
format quick label=vhd
exit
imagex.exe /apply c:\images\install.wim 3 v:\
diskpart.exe
select vdisk file=c:\win2k8r2.vhd
detach vdisk
exit
You can copy this VHD le across to another computer, as long as the volume on
which you put the VHD has enough space. Ensure that the computer to which you are
copying already boots and runs either Windows 7 Professional or Ultimate Editions or
Windows Server 2008 R2. After the le has been copied, perform the following steps:
1. Run the following command, taking note of the CSLID that is displayed:
Bcdedit.exe /copy {current} /d “2K8R2_VHD”
2. Run the following commands, substitute the CSLID, but keep the square
brackets around the drive letter:
bcdedit.exe /set {CSLID} device vhd=[c:]\2k8r2.vhd
bcdedit.exe /set {CSLID} osdevice vhd=[c:]\2k8r2.vhd
bcdedit.exe /set {CSLID} detecthal on
When you reboot, 2K8R2.VHD will be present as a boot item. If you want to copy
the le across to a computer that does not have an existing boot environment, use
Applying a WIM
image to a VHD
and then booting
off the VHD gives
you a quick method
of testing whether
your WIM image
is correctly
configured.
886588c01.indd 17 9/13/11 2:53:53 AM