Adding a native boot VHD to Windows 7 – Part 2

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.



Comments (5)

  1. tonyr says:

    also wim2vhd is awesome for this!

  2. JonD says:

    How can I obtain an install.wim file for Windows XP?  I have the installation disc, but the install.wim file doesn't show up like it does for my Windows 7 installation disc.  

  3. cmayo says:

    @JonD – I'm not sure, but I don't think that install.wim was provided back in Windows XP.

  4. JonD says:

    Is it possible to create a Windows XP VHD?

  5. Odda says:

    Windows xp to vhd i think not will be possible since that is a new futere in windows 7