Native VHD Boot in Windows 8


To totally unlock this section you need to Log-in


Login

Windows 7 and Windows 8 can be booted directly from a virtual hard disk (VHD) file in the absence of a hypervisor such as Hyper-V. In this post we'll learn how to create a VHD-based instance of Windows 8 that runs on an existing Windows 8 physical computer.

Scenario

Here’s the situation: You are a Windows systems administrator who works from a Windows 7 or Windows 8 domain workstation. You need to test out some Windows Server 2012 features without touching any of your production machines. You also need to run Windows Server 2012 on physical hardware instead of as a virtual machine. What do you do?

  • Purchase a new computer to run the Windows Server 2012 instance
  • Configure your Windows workstation in a dual-boot configuration with Windows Server 2012
  • Install Windows Server 2012 onto a VHD and boot your workstation u sing the VHD

In the context of today’s article, the correct answer is the third.

The Native Boot to VHD technology included in Windows 7 and Windows 8 provides an excellent way to multi-boot a computer without the traditional hazards and inconveniences associated with physically installing multiple versions of Windows on the same hardware.

Similarly, the Boot to VHD capability works its magic in the absence of a hypervisor such as Hyper-V. Thus, we can boot a VHD-based operating system and access the host computer hardware directly.

Finally, we can back up and restore the entire configuration by working with a single file–the virtual hard disk (VHD) file.

The high-level overview for creating a Windows 8 VHD and booting from it is as follows:

  • Create a VHD file and prepare it to receive an OS.
  • Mount the Windows 8 DVD (or ISO file) on your host computer.
  • Obtain ImageX.exe and use the utility to apply a Windows 8 image to the VHD file.
  • Add the VHD-based Windows 8 installation to the host computer’s boot menu.

We’ll cover each overview step in detail right now.

Create a VHD File

We can use the GUI Disk Management Microsoft Management Console (MMC) or the command-line diskpart tool to create the VHD file.

For instance, open Disk Management and click Action > Create VHD. This action invokes the Create and Attach Virtual Hard Disk dialog box, where you can define the VHD parameters. If you’d like, you can copy my settings as shown below.

Native VHD Boot in Windows 8

Once you create and attach the VHD, be sure to initialize it and build a single, simple volume. The drive letter that Windows provides does not matter, although we need to remember the designation later in this procedure.

Mount the Windows 8 DVD

This step is straightforward enough. If you don’t have the physical Windows 8 media, you can use a number of third-party utilities to mount the ISO version of the DVD to your host computer’s file system. For instance, we've had good luck with both of the following free tools:

  • Virtual CloneDrive
  • ISODisk

Make a note of the drive letter assigned to the Windows 8 source media; you’ll need that bit of info as well.

Apply Windows 8 to the New VHD File

This is the only step that is a bit of a pain, only because you may have to download and install the huge Windows Assessment and Deployment Kit (ADK) for Windows 8. Why? Because the ImageX.exe tool that we need to complete this step is seemingly available only from within the Windows ADK.

Once you’ve installed that enormous toolset, you can extract ImageX.exe from the following path:

C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools\x86\DISM

If you plan to run ImageX on a 64-bit system, then check the amd64\DISM folder instead.

Now, open an elevated command prompt on your host computer, navigate to the folder that contains ImageX, and run the following statement to “installWindows 8 from its source WIM file to your newly created VHD:

ImageX /apply d:\sources\install.wim 1 f:\

Here’s an explanation of the syntax:

  • /apply: This parameter “installs” a WIM image to a target
  • d:\sources\install: This is the path to the Windows 8 source media. Of course, you may have a different drive letter in play.
  • 1: This is the WIM index number from the source media.
  • f:\: This is the root of our VHD file. Again, your drive letter might be different from mine.

We will show you the results of the above syntax in the next screenshot.

Native VHD Boot in Windows 8

If you pop open Windows Explorer and browse to the root of your VHD file, you’ll see what appears to be a standard installation of Windows 8. We show you this interface below.

Native VHD Boot in Windows 8

Add the VHD to the Host Computer’s Boot Menu

The final step is pretty easy: to add the new VHD installation to our host computer’s boot menu, run the following statement from your elevated command prompt:

bcdboot F:\Windows

Again, we showed you the syntax results in the previous step. We can now restart the computer at test out the new configuration!

Testing it Out

During the first system startup with the new VHD present, you will see the interface shown below.

Native VHD Boot in Windows 8

Deciphering the entries on the new boot menu is pretty easy if you’ve installed Windows 7, Windows Server 2008 or Windows Server 2012. However, things can get (seemingly) hairy if your host PC runs Windows 8 and you attach another Windows 8 VHD.

As you can read in the above screenshiot, our current default installation is on “volume 4”. This tells me, by default, that my VHD installation is on “volume 2”, whatever that is. For now, go ahead and select your new installation and let the boot proceed.

As shown in in the next screenshot, you’ll be taken through the traditional Windows 8 out of box experience (OOBE) steps as if you were setting up a new computer. Hardware detection, prompts to run Windows Update – the works.

Native VHD Boot in Windows 8

Once you’re logged in, your best bet to customize the Windows 8 boot configuration database, which involves setting a default installation, setting a boot menu timeout value, and (most importantly here), renaming the boot entries.

I’ve had great luck with EasyBCD; if you want (or you are a glutton for punishment), you can use the built-in BCDEdit command-line tool or Windows PowerShell v3. I show you in the next screenshot how simple it is to customize the BCD by using the free EasyBCD tool.

Native VHD Boot in Windows 8

So there you have it, friends! Please be aware that although we used only Windows 8 in this example, these steps should work with any combination of Windows 7, Windows Server 2008 R2, or Windows Server 2012.

Download

To download the following tools you will need to register and/or login on HeelpBook. It's totally free (and quick).

ISO Disk
Virtual Clone Drive

1 thought on “Native VHD Boot in Windows 8”

  1. Using dual boot systems today is an old (but always usable) way to provide access to multiple operating systems on computers. Since Windows 7 to Windows 10 we can now use VHDs (virtual disks) on our systems to use multiple operating systems with hardware-level communication!

    See how on Heelpbook:

    Native VHD Boot in Windows 8http://heelpbook.altervista.org/2015/native-vhd-boot-in-windows-8/ #windows8 #microsoft #howto #tutorial #vhd #heelpbook @heelpbook

Comments are closed.