Worlds Easiest boot to VHD directions for Windows 8


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.

image

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)

image

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)

image

Mark the VM partition as active

image

 

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


Comments (5)

  1. GrantH says:

    You could also use the tool formerly known as wim2vhd, now known as Convert-WindowsImage.ps1 to convert the WIM from the Windows 8 media directly to a VHD file. Then you can skip steps 1 & 2 (maybe even 3??)

    Download: gallery.technet.microsoft.com/…/Convert-WindowsImageps1-0fe23a8f

    Run: PowerShell (elevated)

    PS :> Convert-WindowsImage.ps1 -ShowUI

    Fill out the UI, select the SKU. Wait 5min

    Done.

  2. Scott Barnes says:

    As always mr chuck, love your work and saved my bacon

  3. John.Obeto says:

    Won't the command

    bcdboot xwindows – where x is the drive letter suffice =, and obviate the need for EasyBCD?

  4. Michael says:

    Hi Charles,

    I left a comment here yesterday, but it seems it has disappeared, or did you not approve it?

    Regards,

    Michael

  5. Wow, I didn't know that we can that! thanks for the tip 🙂

Skip to main content