In my last post, I described some of the ways in which Windows 7's support for native boots from a VHD can prove to be useful. In this article, I will outline how you can install Windows 7 on a VHD. I am aware of four alternative methods:

Install Windows 7 directly ^

1. You can install Windows 7 directly to a VHD. I find this procedure quite complicated.

Install Windows 7 in a Hyper-V virtual machine ^

2. If you have Hyper-V, you can install Windows 7 there, and then copy the VHD to the physical computer from which you want to boot this machine. Don't forget to sysprep the machine first:
C:\windows\system32\sysprep\sysprep /generalize /shutdown

Use ImageX and Windows Disk Management ^

3. If you have another Windows 7 or Windows Sever 2008 R2 machine, you can create and attach a VHD using Disk Management and then use ImageX of the Windows 7 WAIK to apply an OS image of install.wim (from either the Windows 7 ISO file or DVD) to the mounted drive as follows. Note that "x" represents the drive letter of the drive on which you mounted the VHD and that "4" points to the fourth OS image in the WIM file, which is Windows 7 Ultimate:

imagex /apply d:\install.wim 4 x:\

Use Wim2VHD ^

4. The Wim2VHD tool is similar to method 3 in how it works, but is perhaps a somewhat easier method than the manual one described in method 3. To use this tool, you will also need a Windows 7 or Windows Server 2008 R2 machine and a Windows 7 WAIK.

It may also be possible to use Virtual PC 2007 to create the Windows 7 VHD -- but this didn't work when I tried it. Maybe it was because my "physical test machine" was a virtualized VMware Workstation machine. Windows 7 started to boot from the VHD within the VMware VM, but then VMware Workstation produced an error message: "The CPU has been disabled by the guest operating system". Well, even Windows 7 can't run without a CPU. I think the problem was caused by the Virtual PC VHD. Cesar da la Torre had a similar problem in a physical environment.

Subscribe to 4sysops newsletter!

Do you know of any other ways to create a Windows 7 VHD that can be used as a boot device on a physical machine?

  1. SLam 14 years ago

    I have W7 and R2, so I can test out methods 2,3,4.

    VHD is a good flexible format that can be easily converted to VMDK and XVA.

  2. Joel 14 years ago

    There is a tool on MSDN for quickly creating VHDs. It does not zero out the contents of the VHD, so do not use if others will have access to the VHD, but for testing, it is a huge time saver:

  3. Michael Pietroforte 13 years ago

    Slam, I hope your tests were successful. 😉

    Joel, thanks for the tip. I blogged about the VHD tool last week.

Leave a reply

Your email address will not be published.


© 4sysops 2006 - 2022


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account