Native VHD Boot on a Windows XP computer
Like almost every other corporate in the world, where I work there is a standard build deployed to everyone. The default in our particular organisation is a 32-bit Windows XP OS regardless of the capabilities of the laptop or desktop it is deployed to. Over the years, this has caused a number of problems that have required an increasing number of “exemptions” from standard policy to allow people to run a different Windows version or platform.
Whilst this hasn’t been too much of a problem for the majority of the Architects I work with - after all, we’re fairly self-sufficient when it comes to supporting our environments and are infinitely capable of collectively dreaming up ever more creative workarounds for the things that don’t work - it isn’t a solution that’s manageable at scale.
Then, along came Windows 7 and Windows Server 2008 R2 and with them came the introduction of a great new feature - Native VHD Boot. With a little configuration, this has enabled us to leave the existing Windows XP corporate build in place, and to deploy a 32-bit or 64-bit Windows 7 (Enterprise or Ultimate) or 64-bit Windows Server 2008 R2 build side-by-side, crucially without having to make any changes to the Windows XP build or the existing disk partitioning scheme.
To achieve this, we created a new Windows 7 or Windows Server 2008 R2 bootloader, and “chained” the original Windows XP bootloader from it. At boot, this allows us to select a Native VHD Boot into, for example, a 64-bit Windows Server 2008 R2 Enterprise build, or to select the chained bootloader which allows us to boot into the corporate Windows XP build.
Of course, you’ll need to create your VHD-contained Windows 7 or Windows Server 2008 R2 OS build and put it to your local disk, and this post doesn’t go into that detail, but once you have done that, the steps below will allow you to create a new bootloader and chain your existing Windows XP corporate build from it.
To begin, boot your computer using your Windows 7 or Windows Server 2008 R2 installation media. When you reach the Install Windows screen, press Shift+F10 to run up a Command Prompt window.
To write the new Windows 7 or Windows Server 2008 R2 bootloader:
BOOTSECT /NT60 C: /FORCE /MBRTo create a BCD store from the Windows VHD:
DISKPART
SELECT VDISK FILE=C:\BOOTVHDS\W2K8R2ENTX64.VHD
ATTACH VDISK
ASSIGN LETTER=X
EXIT
BCDBOOT X:\WINDOWS /S C:To set up the Native VHD Boot:
BCDEDIT /SET {default} DEVICE VHD=[LOCATE]\BOOTVHDS\W2K8R2ENTX64.VHD
BCDEDIT /SET {default} OSDEVICE VHD=[LOCATE]\BOOTVHDS\W2K8R2ENTX64.VHD
BCDEDIT /SET {default} DETECTHAL ONTo set up the legacy boot:
BCDEDIT /CREATE {ntldr} /d "Chain Legacy Bootloader"
BCDEDIT /SET {ntldr} DEVICE PARTITION=C:
BCDEDIT /SET {ntldr} PATH \ntldr
BCDEDIT /DISPLAYORDER {ntldr} -ADDLASTTo put things back to normal, should you ever need to:
BOOTSECT /NT52 C: /FORCE /MBR
Originally a guest post at Mark Wilson's blog.
Print This Post







March 30th, 2010 - 19:29
By now you could of course use EasyBCD 2.0 beta for convenience…
sebus
April 4th, 2010 - 11:43
Hi Sebus, thanks for your comment. I haven’t used EasyBCD 2.0 beta personally but if it is able to easily reproduce these steps, then your comment may be helpful to others. Kind regards, Garry
April 19th, 2010 - 11:46
And how about natively booting Vista (W2K8 Server) and/or XP (W2K3 Server) from vhd
Possible at all?
April 19th, 2010 - 12:37
Hi Sebus, not that I am aware of. You need the VHD drivers to be present in the underlying OS that you are attempting to boot.
April 19th, 2010 - 11:52
Linux (Ubuntu) native boot from vhd is available:
http://www.vmlite.com/index.php/forums/17-vboot/1864-linux-vhd-boot-available-download-and-boot-your-physical-pc-also-runs-as-vm
April 19th, 2010 - 12:38
Hi Sebus, that looks like interesting technology. I note they have implemented the VHD kernal mode drivers in their distribution and are open sourcing the code, so who knows what we might be able to boot from VHD in the future?
April 19th, 2010 - 12:43
Seems like yes (at least for XP):
http://www.vmlite.com/index.php/forums/17-vboot/1926-how-can-i-boot-xp-vhd-from-vboot
For Vista (W2K8) can the drivers be “pulled” from W7/W2K8R2 ?
April 19th, 2010 - 12:47
Hi Sebus, I’m not aware of any solutions in this area at this time, and am no longer actively looking at this to be honest. Perhaps if you do find that it can be done, you could post back with a link to instructions or create your own post detailing the steps required?