Boot from VHD - What worked for us

My son and I spent most of the day yesterday trying to get our laptops to boot from a VHD.  We found loads of posts on the Internet that showed how it should be done, but we couldn't make it work.  When we finally were successful, we found what we believe is an easier process, at least for us.  I'm posting those steps here for future reference.

The goal was to run Windows 8.1 on a laptop, but to have the option to boot into Windows 7 when needed.  I used an HP EliteBook 8540w, which is easily able to run Windows 7.  (It has Windows 7 drivers available, uses BIOS instead of UEFI, and has no SecureBoot support.)  My son used his Dell Inspiron 15 7000 Touch, which does NOT have Windows 7 drivers available.  His laptop has all the latest goodies, including UEFI and SecureBoot. 

Here is our list of steps:

  1. Create a fixed-size hard disk with Hyper-V Manager.  You need to use the VHD format, because VHDX only works with Windows 8.x / Widows Server 2012 and above.  
  2. Create a VM for your VHD, and install Windows 7.  I also installed SP1 and all of the updates and patches.
  3. Run SysPrep on the VM, and specify OOBE, Generalize, and Shutdown.
  4. Copy the VHD to the laptop that will use it for boot.  (I created the VHD on a new, faster, laptop.)
  5. Mount the VHD with Disk Manager and note the driver letter that is assigned.  On my laptop, it was drive G:
  6. Open an Administrative Command Prompt
  7. Run BCDBoot G:\Windows
  8. Run BCDBoot C:\Windows
  9. Reboot the laptop.

After following these steps, my laptop could successfully boot into Windows 7.   My son's could not.  We believe that the only difference was that my laptop has Windows 7 driver support, while his does not.

I believe that this is an easier process, because I did not have to use BCDEdit or ImageX, which were recommended in all of the posts that I found.  These steps are very similar to those that I use to create VMs in Hyper-V, so I find them more intuitive.

There are some caveats:

  • If you have enabled Hyper-V one the machine, this this process will disable it.  You can re-enable the hypervisor by running this command from and Administrative Command Prompt:
    • BCDEdit /set {current} hypervisorlaunchtype auto
  • Your laptop has to be able to run the guest OS in the first place (my son's could not because there are no Windows 7 drivers available)
  • You need to disable BIOS/UEFI features that are not supported by your guest OS (SecureBoot, for example)
  • You can only use the VHDX format if your guest OS supports it (Windows 8.x / Windows Server 2012)
  • Be ready to admit that your son knows more about this than you do. :)