Boot from Windows 7 VHD Boot without having any native Operating System

VHD boot is a new feature of Windows 7 and can be used in very creative ways. If you have a need for Reimaging a machine (like a testing environment) back to its original configuration then booting from VHD seem to be a very easy way to do it.

In this post I will outline the quickest way to build a machine from scratch with a VHD without installing any native operating System.

To get started you will first need to create a Windows 7 WinPE USB Disk (this can be done using the Windows 7 AIK)

  1. Boot the machine from the USB Drive into WinPE
  2. Format C: /q   -- This is optional, but make sure you delete c:\bootmgr
  3. Copy Windows 7 VHD file to any location on the hard disk [In this case I copied it to C:\VHD\Win7.vhd]
  4. Copy Bootmgr from the USB disk – Very important step, only the windows 7 Bootmgr will allow boot from VHD
  5. Type the following commands in the WinPE command window
    • C:\>DISKPART
    • DISKPART>SEL VDISK FILE="C:\VHD\Win7.vhd"
    • DISKPART>ATTACH VDISK
    • DISKPART>LIST VOL (This lists the drive letters and mappings, assuming F: maps to the VDISK)
    • DISKPART>Exit
    • C:\>Bcdboot F:\Windows

Now the system is ready, just Reboot the system and this will take you straight into your VHD.

If you have multiple VHDs, then you can copy all of them to the hard disk and repeat Step 5 for each of the VHD, specifying the path and file name appropriately.