Virtual Hard Disk (.vhd) is the file format of virtual machines hard disk drives. Connectix and Microsoft are currently using this technology. You can check the Virtual Hard Disk Image Format Specification for more details.
Windows Imaging Master (.wim, .swm) is the file format for deploying Windows OSes since the XP version.
The goal of this post is to explain how to produce a WIM master file after having prepared a VHD master.
1/ prepare the virtual machine master
- install the OS, the program you want to use
- in case you would like to perform a unattended installation, I advise you to check the Sysprep a Windows 7 Machine - Start to finish post.
2/ convert the virtual machine VHD to a VIM
2.1/ if you used at least 1 snapshot (avhd): (if not, go to 2.2), we have to produce a single VHD file.
When using snapshots, it creates a tree of virtual machine states. The root node (the root "-" sign) is a VHD, and each icon is a AVHD storing the differences made regarding the parent disk.
In our example, we have a total of 8+1 avhd files. (8 snapshots, and the final state).
The problem is that, on windows 7 / 2008R2, we are currently only able to mount a VHD.
If you do not want to loose your snapshots, you have to perform:
2.2/ Mount the VHD (as read only) in your host system
As a local administrator, open a command prompt:
- wait for the process to finish
3/ Configure the WIM server
- tip: the boot.wim is located in the sources folder which is at the root level of the iso.
- the image.wim is the one we just created before
4/ Enjoy your deployment!
The idea beyond this article is to have a virtual machine which we can freely improve, thanks to a snapshot hierarchy. And as soon as a new master is ready, simply publish it as a new Windows Deployment Services entry.