I have created several boot to vhd images and found a path that only requires one command line step.
Step 1
Create a VM in Hyper –V.
One important step in the creation, particularly if you are using an SSD is make sure the max drive size is less than your available space.
My last VM would never be more 20gb so I left the max size as the default –120gb (unfortunately on a 120gb SSD)….Turns out during the boot and initialization of Windows 8 of a boot to VHDX it allocates all that space –and fails to to boot with a BSOD if it can not get it.
Step 2.
Install Windows 8 on the Hyper V VM
- During the VM creation you just indicate the Windows 8 ISO should be mounted automatically and when you start the VM Windows 8 setup will automatically kick off.
(I downloaded the Windows 8 ISO from MSDN)
Step 3.
Make the VM bootable
After Window 8 is installed stop the VM and mount the VHDX you created in step 1 in Disk manager (in explorer right click computer and choose manage)
Mark the VM partition as active
Now to copy over the boot files: from an elevated command prompt run
Bootbcd c:\windows /s <vmdrive>
in this case it was
Bootbcd c:\windows /s f:
4. Add a boot entry for the new VM…at home I use easybcd and recommend people buy it for work. The two caveats with it are:
*Their file open dialog for new disk images entries doesn’t included ".vhdx” files so you need to add *.* so it let you view them.
*After you add a disk image entry selecting their “view settings doesn’t show the entry – but it was added. Just exit and restart easybcd and now you can see your entry….or just exit and restart your machine – because you are done!
in my case the entry looked like:
Entry #4
Name: vhdX Windows 8 Image
BCD ID: {353cc69a-e8f4-11e1-be8e-889ffaf0fc8f}
Device: [C:]\win8\win8.vhdx