How to Boot from VHD with Windows 8 Developer Preview

I received a tweet from Jeffery Hicks that many of you want to know how I did the boot from VHD with Windows (Server/Client 8. Here we go!

image


INTRODUCTION

The four steps are:

  1. Prepare VHD
  2. Locate install.wim image
  3. Apply Windows *.wim image to VHD
  4. Configure VHD for native boot

From an administrator command prompt in Windows 7 or Windows Server 2008 R2 (SP1):

Create VHD
  • > diskpart
  • > create vdisk file=”[drive]:vhdwinsrv8devprev.vhd” maximum=40000 type=FIXED
  • > select vdisk file=”[drive]:vhdwinsrv8devprev.vhd”
  • > attach vdisk
  • > create partition primary
  • > assign letter=W   #can be any free drive letter; cancel popup to format this disk
  • > format quick fs=ntfs label=WINSRV8DEVPREV
  • > exit
LOCATE INSTALL.WIM IMAGE
  • Check that install.wim and the powershell script are in the [drive]:vhd directory

 

APPLY WIM IMAGE TO VHD
  • > cd [drive]:vhd
  • > Powershell
  • PS> set-ExecutionPolicy Unrestricted
  • PS> .Install-WindowsImage.ps1 –WIM [drive]:vhdinstall.wim
  • PS> [R}un once

You know see there is one or more images:

image

  • PS> .Install-WindowsImage.ps1 –WIM [drive]:vhdinstall.wim –Apply –Index 1 –Destination W:
  • PS> [R}un once

This may take up to 15 minutes. With a fast SDD this is much shorter

image

CONFIGURE VHD FOR NATIVE BOOT

  • > bcdboot w:windows

You can now check the boot entries with

  • > bcdedit /v

If you want this installation of Windows 8 to also support Hyper-V, add the following entry to your boot configuration

  • Find the GUID of the Windows 8 boot part which is between { }
  • Make a copy of your boot file with
  • > bcdedit /export “tempbcdbackup”
  • Add hypervisor entry
  • > bcdedit /set {ee73a92b-c385-11e0-a663-be9bd6f43bf9} hypervisorlaunchtype auto

After you reboot, the sysprepped Windows 8 Developers Preview will start and you can configure your Windows 8 server or client.

Don’t panic if you don’t see a boot choice when you start your computer. The boot choice is moved to the Windows 8 Boot Loader Screen which looks very pretty.

Well, good luck and let me know if it has been successful. If you find any mistakes, also let me know!

A few retweets might help Glimlach

11 Comments

  1. September 15, 2011    

    If you use bitlocker (like me) this = no go! :(

  2. September 16, 2011    

    VHD is not attached at boot time and the boot loader sees no fles to load, so dual boot fails. I am using windows 7 Enterprise and created the vhd in a folder on drive C. Seems it can only work with HyperV. Any suggestions?

  3. September 17, 2011    

    quotes are needed around your GUID

  4. adminHans's Gravatar adminHans
    September 17, 2011    

    Have you done the bcdboot [drive]windows ?
    I have worked with Boot from VHD with Windows 7 Enteprise for several years no without an issue.
    As Sander said Bitlocker should be disabled

    Regards, Hans

  5. September 18, 2011    

    Worked great for me for:
    - a VHD in Win7 (no HyperV needed)
    - a 2011 MacBook Pro
    - installing the Win8 Preview w/ Developer Tools

    Only tip if you do the same, make sure to have the Mac’s disks ready to reinstall the Mac BootCamp-specific wireless and keyboard drivers afterwards since Win8 doesn’t support them out of the box – but they definitely work with a Win7-compatibility install.

    Thanks – exactly what I wanted to do.

  6. September 18, 2011    

    Its working fine..in my windows7 home basic laptop …
    Thanks a lot…

  7. September 21, 2011    

    Hey, just wanted to say thanks for this. It was exactly what I was looking for, no nonsense just straight to the point 1,2,3.

    Also a quick note for other readers: Don’t forget native VHD boot is only supported in Win7 Ultimate or WinServer 2008 R2.

    • adminHans's Gravatar adminHans
      September 22, 2011    

      As well as Windows 7 Enterprise ;-)

  8. September 25, 2011    

    Many thanks!!!
    I was having many problems installing Win8 on a UEFI system since it does not recognize NTFS USB sticks and Win8DevPreviewWithTools cannot be stored on a FAT USB since it has a file >4GB.
    This saved my day!

  9. Emiliano's Gravatar Emiliano
    May 8, 2014    

    No way!
    Windows 8.1 Pro wuth UEFI as host OS and a VHD running ok with Hyper-V.
    BCDBOOT command failure when attempting to copy boot file.
    Try some options like /s and /f, no errors but no dual boot (simply the virtual disk is detached at restart).
    With EasyBCD the boot menu appears but 7 didn’t start.

    • May 9, 2014    

      Did you run the bcdboot in an administrative command prompt? Have not tested with UEFI systems.

  1. Install steps Windows 8 Server as VM » Jack's Server blog on September 15, 2011 at 20:36
  2. BCDEdit Command-Line Options | Tech Tips on October 9, 2011 at 00:00
  3. How to Boot from VHD with Windows 8 Developer Preview | Hyper-v.nu | Tech Tips on October 9, 2011 at 00:03
  4. How to Boot from VHD with Windows 8 Developer Preview | Hyper-v.nu « t3ch on January 7, 2012 at 17:03
  5. Windows 8 developer preview, De installatie « berryvermeulen on February 18, 2012 at 14:16
  6. How to Boot from a VHD in Windows Server 2012 / Windows 8 | ScorpioTek's Blog on August 10, 2012 at 18:43

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">