Setting up Windows 8 Consumer Preview to Boot from VHD

Have you install Windows 8 Consumer Preview (Win 8 CP) yet? If not here is a good guide shared by Raymond Chou (Microsoft Most Valuable Professional in System Center Operations Manager and System Center Essentials) about how to setup Win 8 CP to boot from VHD.

Step 1: Download the Windows 8 Consumer Preview ISO

Step 2: Have installed UltraISO or PowerISO. We need this to mount the ISO to copy out the install.wim image

Step 3: Create a directory where you would like to place the VHD file. In my case, I created Z:\VHD\Win8Beta

Step 4: Mount the Windows 8 ISO

Step 5: from the mounted drive, copy the \sources\install.wim to the created directory [e.g. Z:\VHD\Win8Beta]

Step 6: Download the Install-WindowsImage PowerShell script and copy it into the same directory as above

Step 7: Create the VHD using the following steps in Windows 7

Step 7a: Launch the Computer Management app

Step 7b: Right-click Disk Management and select Create VHD

1

Step 7c: Create the VHD in the directory created earlier with the size of your choice. I wanted to do some performance testing, so I selected Dynamically Expanding for my disk type

2

Step 7d: Once done, from the Disk Management control panel, you should see the created and attached VHD. Proceed to initialize the Disk

4

Step 7e: Next create a Primary partition

5

6

Step 7f: Assign a drive letter so that we can perform the WIM install later. In my case i assigned [M:\]

7

Step 7g: Perform a Quick Format of the drive

8 

Step 7h: You should have an end result of a formatted VHD attached to the drive letter. Once again ensure you have the install.wim, the powershell script, and the created VHD in the directory you created

9

10

Step 8: Apply the WIM Image to the VHD using the PowerShell script

Step 8a: Launch a CommandPrompt run as Administrator

Step 8b: Change to the directory containing the VHD, WIM image and PowerShell script {cd z:\VHD\Win8Beta}

Step 8c: launch powershell {> Powershell}

Step 8d: Run the following powershell commands one by one (replace the drive in the command below with the one you created):

     PS> set-ExecutionPolicy Unrestricted
     PS> .\Install-WindowsImage.ps1 –WIM Z:\VHD\Win8Beta\install.wim
     PS> [R]un once
     PS> .\Install-WindowsImage.ps1 –WIM [drive]:\vhd\install.wim –Apply –Index 1 –Destination W:
     PS> [R}un once

 

The steps above are shown in this screenshot below:

11

 

Once done, you should see the Windows 8 system populated in the mounted drive

12   

Step 9: Configure the Boot Menu for the VHD to Native Boot

Step 9a: In the Command Prompt window, execute:

     > bcdboot m:\windows

     *in my case, m: was the drive that i used to assign the VHD to.

Step 9b: check your boot entries:

     > bcdedit /v

 

Below shows a screen shot of Step 9:

14

 

Step 10: Reboot and configure your Windows 8!

Here is the new boot menu after you reboot.

WP_000261

 

Please drop by to Raymond’s blog for more details about setting up Win 8 CP to boot up from VHD.