Share via


The Virtualization Nation Podcast – Episode 3: Want to boot a physical computer from a VHD?

Of course you do.   And in this episode of the Virtualization Nation Podcast, I’ll show you how. 

But first, a little background.

Earlier today, I posted a description of the new Native VHD integration in Windows 7, Windows Server 2008 R2, and Microsoft Hyper-V Server 2008 R2 on the Windows Virtualization Team blog, along with a link to a nifty little Powershell script called Install-WindowsImage.ps1 which I’ll talk about some other time.  The main point of that post was to start getting the word out about Native VHD Boot.

So, what’s so special about this?

Well, put yourself in the shoes of a corporate network administrator (though, when I was a network admin, I didn’t wear shoes all that often).  It’s really very common for a company to have a “base” Operating System image that they can apply to a server or workstation.  This image is usually tweaked with some software and/or patches installed, or is specially configured in some other way.

If that’s the case, it’s possible that you would need to maintain two (or more) images: one for virtual machines (probably a VHD), and one for physical machines (maybe a WIM or a Ghost file).

With Native VHD Boot, you can finally have one, single base image that works everywhere.  Your VHD can be booted in virtual machines, just like it always did, and it can also be used to boot your physical servers. 

Ok, let’s get right to the heart of this thing.

To boot from a VHD, you need the following things:

  • A physical machine with the Windows 7 boot loader on it.
  • A VHD with a SKU of Windows Server 2008 R2, Windows 7 (Enterprise and Ultimate only – sorry), or Microsoft Hyper-V Server 2008 R2.

Now, you’ve got those things ready, right?  You’re all set?  You’ve read the VHD FAQ? Cool. 

Ok.  You can find instructions on how to configure your computer on various web pages and videos, but they all seem pretty lengthy.

Want something simple?  Something easy to remember?

Of course you do.

[Update - MSN Videos has gone offline, and the videos are no longer available. I'm looking into other options. - mikekol]

For those of you who don’t want to download a video for a “simple” command, here are the Cliff’s Notes:

  1. Get to an elevated or WinPE command prompt.
  2. Use your favorite VHD-creation method to install Windows in a VHD.
  3. Use DiskPart or DiskMgmt.msc to attach your VHD as a drive on your computer, and give it a drive letter (V:\ for example).
  4. Run BCDBOOT.EXE V:\Windows
  5. Sit back, relax, and reboot your computer to start booting into your new OS.

Important Notes:

  1. If you’re booting to a Dynamically Expanding VHD, make sure that you have enough room on your physical disk to hold the VHD as if it were fully expanded to its maximum size.  If you don’t have enough space, you’ll get a bugcheck during boot.
  2. Hibernation is disabled when booted to a VHD.
  3. You can’t boot to a VHD that lives on a network share or a removable storage device.

Comments