Create bootable VHD’s in Windows 7

Roeland Jimenez, 8 december 2009

In Windows 7 you can easily create bootable VHD’s.  As a developer I think this is great especially now after PDC with so many beta releases. With a bootable VHD you can make full use of your hardware and keep a clean production machine. In this post I’ll show you the steps to create a bootable VHD that has been created in Windows Virtual PC.

The steps that we need to take are as follows:

  • Create a virtual machine using Windows Virtual PC (If you already have one, go to step 2)
  • Open you virtual machine in Windows Virtual PC
  • Run sysprep
  • Make it bootable

First you need a virtual machine. You can create a new one or use an existing one.
Open the virtual machine using Windows Virtual PC. When the virtual machine is loaded and you have logged in, run sysprep.
Open the command prompt as administrator. In the command prompt type:

c:\windows\system32\sysprep\ sysprep /generalize /shutdown

This will open the System Preparation Tool. Be sure to select the Generalize checkbox.

Wortell blog - Create bootable VHD’s in Windows 7

Wortell blog - Create bootable VHD’s in Windows 7

The next step is to add the VHD to the boot menu.
On your main system open the command prompt as administrator and type:

C:\>bcdedit /copy {current} /d "Beta System VHD"

This will great a GUID for your new entry. Copy this and use it in the line below:

C:\>bcdedit /set {98684a74-c96a-11de-a111-002170eb3c93} device vhd=[c:]\VHD\BetaSystem.vhd
C:\>bcdedit /set {98684a74-c96a-11de-a111-002170eb3c93} osdevice vhd=[c:]\VHD\BetaSystem.vhd
C:\>bcdedit /set {98684a74-c96a-11de-a111-002170eb3c93} detecthal on

Note: point the vhd= to your VHD on you file system.

That’s it. If you reboot your system, you will see you new VHD in the boot menu.

You can also create an VHD using the Disk Manager. Aviraj Ajgekar’s writes a great article on his blog “Windows 7: Boot from VHD First Impression”.

I hope this helps you having a clean production system.
Happy programming,

A special thanks to Volkert for testing this with me!

Categorieën: Nieuws
Tags:

Geef een reactie

Jouw e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd met *

*

De volgende HTML tags en attributen zijn toegestaan: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Categories

  • Tags

  • Blog Authors

    Amy
    anita
    Anneke
    Danny Burlage
    Dennis Vendel
    Freek Berson
    Gerard
    Iris
    Jasper Oosterveld
    Jean-Claude Chan
    Jorn
    Lab Chicks
    Luc Joziasse
    Maarten van Noort
    Maarten Wijsman
    Marlon
    Martijn Bellaard
    Natasja van Doorn
    Paul Pascha
    Peter Heuvelman
    Rick Slager
    Robert van Son
    Roeland Jimenez
    SanderZ
    Sjoerd Schudde
    Stefan van der Wiele
    Tim Heuperman
    Wortell
  • Archief