Datasheet

18
ChAPTeR 1 Windows Server 2008 R2 Deployment Secrets
diskpart.exe to congure the volume and then the BCDboot tool to create the boot
conguration. BCDboot is located on the Windows PE media.
SERvICINg vHD FILES wITH DISM.ExE
You can use the DISM.exe utility to service ofine VHD les in the same way that you
use the tool to service WIM images. Rather than using DISM.exe to mount the VHD
le, you use the Diskpart utility to attach the le as a volume.
To mount the le c:\2008R2.vhd as a volume associated with the drive letter v,
issue the following commands from an elevated command prompt:
Diskpart.exe
Select vdisk file=c:\2008r2.vhd
Attach vdisk
Assign letter=v
exit
After you’ve done this, you can use the DISM.exe commands that you learned
earlier to service the image. For example, to recursively add drivers stored in the
c:\drivers directory to the mounted image, issue the command:
Dism.exe /image:v:\ /add-driver /driver:c:\drivers /recurse
To add all updates in the c:\updates directory to an image, issue the command:
Dism.exe /image:v:\ /add-package /packagepath:c:\updates\
To enable a specic role or feature, use the /Enable-Feature option. For example,
to enable the DNS server role and to install the DNS management console, issue the
commands:
Dism.exe /image:V:\ /Enable-Feature:DNS-Server-Full-Role
Dism.exe /image:V:\ /Enable-Feature:DNS-Server-Tools
When you are nished servicing the VHD le, you need to detach the VHD to com-
mit your changes. This is done by typing the following from an elevated command
prompt:
Diskpart.exe
Select vdisk file=c:\2008r2.vhd
Detach vdisk
exit
You cant
perform an offline
service on a VHD
file when you are
booted into the
operating system
that it hosts.
886588c01.indd 18 9/13/11 2:53:53 AM