Welcome to TechNet Blogs Sign in | Join | Help

Canadian IT Professionals

Connecting Canadian IT pros.. It's all about Technology and a whole lot more!

News



  • Sharing of thoughts and information is what blogging is all about. This way we can learn from each other. Post A Comment!

    These postings are provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

    Resident Bloggers

    Rick Claus
    IT Pro Advisor
    Connect with Rick


    Rodney Buike
    IT Pro Advisor
    Connect with Rodney


    Damir Bersinic
    IT Pro Advisor
    Connect with Damir



Windows 7 Boot From VHD

I posted this to my other blog, thelazyadmin.com but thought it might be useful to post here as well.

One of a new features in Windows 7 and Windows Server 2008 R2 is the ability to boot from a VHD.  It is pretty simple to enable this feature and have it ready at your disposal!  Before you begin you should note the following…

  • You can only boot a Windows 7 or Windows Server 2008 R2 VHD
  • You must configure the boot editor from a Windows 7 or Server 2008 R2 install
  • You cannot use a Virtual PC VHD, I suggest a Hyper-V VHD
  • You need to start with a clean slate, don’t try and reuse an old VHD

I am sure this will change as Windows 7 goes through the beta and RC stages on its way to RTM and we’ll update this as necessary but here goes…

Start by launching a Command Prompt and be sure to run as Administrator, once that is done run the following commands…

bcdedit /copy {current} /d “Boot_From_VHD”

Copy the CSLID that is displayed and then run…

bcdedit /set {CLSID} device vhd=[C:]\vhdname.vhd

bcdedit /set {CLSID} osdevice vhd=[C:]\vhdname.vhd

bcdedit /set {CLSID} detecthal on 

You can replace [C:]\vhdname.vhd with the path and name of your VHD.

Once that is complete reboot and you will have the option to “Boot_From_VHD”!  You can verify the bootloader is configured correctly with the bcdedit command which will list all the boot options.  If you want to delete the entry make note of the GUID listed in bcdedit and use the following command…

bcdedit /delete {GUID} /cleanup

For more information be sure to check out the Windows 7 resource page on Technet.com

Posted: Tuesday, January 13, 2009 12:30 PM by rodney.buike

Comments

Steven Wabik said:

this is a very cool feature. I created a VHD image of my computer. the VHD of my computer has Windows 2000. i created it because of certain software that cannot be installed under virtual machine. Do you think i can use this VHD with the Windows 7 VHD boot feature?

# January 15, 2009 2:37 PM

rodney.buike said:

Hi Steven,

You can only boot Windows 7 or Server 2008 R2 VHDs.  

Rodney Buike

IT Pro Advisor

# January 16, 2009 2:14 PM

Steven Wabik said:

i am trying to mount a VHD image and i keep getting an element not found issue. why is that?

# January 19, 2009 1:26 AM

Matthijs Hoekstra said:

Hello, you have a typo in your commands, The last one should be:

bcdedit /set {CLSID} detecthal on

# January 21, 2009 6:32 AM

rodney.buike said:

Hi Steven,

I had a typo in the last command that was kindly pointed out by Matthijs and the entry has been corrected :)

Thanks Matthijs!

Rodney Buike

IT Pro Advisor

# January 22, 2009 1:44 AM

harold said:

How do you create a clean slate VHD?

# February 10, 2009 6:40 PM

rodney.buike said:

Hi Harold,

The easiest way to create a clean VHD is to use WIM2VHD which is a beta tool that will convert a Windows 7 WIM image to a VHD you can boot from.

http://code.msdn.microsoft.com/wim2vhd

Rodney Buike

IT Pro Advisor

# February 10, 2009 7:30 PM

Canadian IT Professionals said:

I had posted this entry on Thelazyadmin.com but after reading a comment asking about a previous post

# February 10, 2009 7:55 PM
New Comments to this post are disabled
Page view tracker