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:
Latest posts by Michael Pietroforte (see all)
- Microsoft Azure for Amazon AWS cloud professionals - Fri, Jul 22 2016
- New free eBook – Windows 10 IT Pro Essentials Support Secrets - Mon, Jul 18 2016
- New wiki doc about Windows 10 privacy settings - Wed, Jul 13 2016
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.
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?