HOW-TO Install Windows 7 Ultimate onto a VHD drive

Virtualization of your desktop

Prerequisites:

  1. Purchased copy of Windows 7 Ultimate “install.wim” d:\source\install.wim
  2. Windows Automated Installation Kit (imagex tool)
  3. Diskpart Utility

Known Limitations:

  1. BitLocker cannot be used on the Hard Disk containing the VHD file.
  2. Hibernate function is not supported

Step by Step

  1. Open the command prompt CMD with elevated permissions.

    You can have a type expandable (dynamic) or fixed, this option is your choice, I would however look over the Disk I/O stats I have attached at the end of this article. I have opted to have a 100 gb disk file for modifications that I will do, I would normally set it for 25g it is more than enough space.

  2. Select your new virtual disk .
  3. Attach your virtual disk.
  4. View of disks currently on the system. Select the correct disk in this example it is disk 3
  5. Make a primary partition.
  6. Select the partition you have just created.
  7. Mark the partition as active
  8. Format your new partition, NTFS and quick format.
  9. Lets assign it a drive letter.
  10. Exit DiskPart to continue
  11. Have a look at our install.wim of course you could customize the xml yourself but for sake of this Step by Step article, I am using the default Windows 7 provided by Microsoft MSDN. On a side note, I have moved my Windows Automated Installation Kit tools into my system32 directory for convenience and extracted the install.wim from my cd:\source directory and moved it to the same directory storing my Virtual Hard drive File (VHD).
  12. Now lets install the install.wim on to the new virtual disk drive that was created, for me that drive is E:\ and I want to use Index 4 from above the Windows 7 Ultimate
  13. Now lets change the boot order. For this step lets return to diskpart and select our VHD
  14. Then detach the Virtual Hard Disk (VHD)
  15. Next step we need to use BCDEDIT I think BCD stands for binary-coded decimalif I remeber correctly. First off lets have a look at bcdedit as it stands right now.
  16. Our next step is to copy our current setup to a new entry called “Windows 7 Ultimate VHD”
  17. Copy the {GUID} displayed on your screen from the last step and run set the device to the vhd file.
  18. Now lets set the osdevice to the vhd file.
  19. Lets turn Detect HAL on. “Insert HAL 9000 joke here.”
  20. Enter a description.
  21. Restart you computer