After creating the native boot VHD in Part 1, the next step is to apply a OS image to the VHD.
Installing the OS
For this next step, you’ll need setup media for the OS you’d like to install. I keep a few bootable USB sticks with the latest OSs in my office to make this step quick and painless.
1. Insert your install media into the DVD drive of your host machine, or in my case, I’ll plug my USB drive (in this example, it’s my G:\ drive).
2. Click Start >> All Programs >> Microsoft Windows AIK >> Deployment Tools Command Prompt, right-click and select Run as Administrator to launch an elevated Command Prompt that has access to all the AIK tools.
3. In the Deployment Tools Command Prompt, type the following command to get the image indexes for the OS versions on your media:
imagex /info g:\sources\install.wim
In the example above, I want to install Windows 7 Enterprise, so the image index I want is “1”.
4. Type the following command to apply the windows image (WIM) to the VHD (installing the OS to the VHD):
imagex /apply g:\sources\install.wim 1 z:\
5. Imagex.exe will give you a progress percentage and a estimated time to completion. When it’s done, the Deployment Tools Command Prompt should look like this:
Note that applying the image took 8 min. 20 sec. Nice!
Be sure to remove the install media or bootable USB so you don’t accidentally boot to that media the next time you reboot your machine.
At this point, you have a VHD with an OS image applied. In Part 3 we’ll add the VHD to the boot menu of the host machine.