Windows 7 VHD Native Boot without any Hosting Operation System
VHD native boot is a big thing in Windows 7. Despite the fact that the guest OS has to be on either Windows 7 or Windows server 2008 R2, the host operation system can be either Windows 7, Vista, or even nothing. If you don’t believe it, follow the steps below, and tip your hat to Vineet, if the trick works.
To get started you will first need to create a Windows 7 WinPE USB Disk (this can be done using the Windows 7 AIK)
- Boot the machine from the USB Drive into WinPE
- Format C: /q — This is optional, but make sure you delete c:\bootmgr
- Copy Windows 7 VHD file to any location on the hard disk [In this case I copied it to C:\VHD\Win7.vhd]
- Copy Bootmgr from the USB disk – Very important step, only the windows 7 Bootmgr will allow boot from VHD
- 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.
For the step 1, as Vineet pointed out in the comment, you can also do it by booting from Windows 7 DVD, when it comes to the first screen, press SHIFT+F10 and you will get the comment window, and you can do the rest from now on.
Credit also should go to Mark Wilson for sharing it by commenting on 7 things about Windows 7 native boot VHD, which you also should be checking out if you want to know more about VHD native boot.
You may also like:
Comments (27)
- 7 Things about Windows 7 Native Boot VHD | Windows 7 Hacker
[...] Windows 7 VHD native boot without any hosting operation system [...] - Knowledgebase » Blog Archive » How to “native boot” from an USB VHD file with Windows 7, without installing a host OS
[...] http://www.windows7hacker.com/index.php/2009/08/windows-7-vhd-native-boot-without-any-hosting-operat... [...]



I read (I think the MS version comparison page) that Native Boot is only possible for Ultimate and Enterprise. Is this true, can you confirm this?
Hmm, I didn’t see anywhere that mentioned this limitation. Maybe I missed something. Please forward me a link where it says so.
As far as I know, any edition of Windows 7 can be installed in VHD, hence can be native booted.
[Paul Thurrott's SuperSite for Windows] Windows 7 Product Editions: A Comparison
http://www.winsupersite.com/win7/win7_skus_compare.asp#enterprise
Lists mounting of VHD as a feature for all versions, but only Ulimate (and Enterprise) as VHD bootable.
[Microsoft TechNet Help] Windows 7 Deployment Frequently Asked Questions
http://technet.microsoft.com/en-us/library/dd744519%28WS.10%29.aspx
Only lists Ulimate (and Enterprise). Other versions not mentioned.
If true it would be bummer.
Thanks Greg for the info. Yes, that sucks if it does. I will dig into it to see if that’s the case.
Hi Kent – thanks for the mention
If you ACTIVATE a VHD then put it on another system… won’t it crap out?
Bios won’t match, activation / registration should fail and if you reactivated then the original Host that built the VHD would probably fail to update or worse.
Seems you’ll never have more than 30 day trial period to run a VHD on another system. I don’t see how Microsoft would allow the world to run VHD’s for free.
Not to be nipcky… because this is really good… but the part about copying the 20+gb vhd file to the drive is glossed over. You’ll need the vhd on
a usb disk, cd or pre loaded onto the hard drive.. then DO NOT format it after you boot from the USB/DVD.
Thanks Terry. that’s a good point. I was going to test it out how it goes with the same VHD on different hardware. However, here are my opinions that tops off my head to the things you mentioned.
It shouldn’t matter when BIOS doesn’t match, because the most incompatible part is the device driver.
Registration is never be an issue in any version. Yes, it most likely that you will need to reactivate the Windows but if you have the legit copy that shouldn’t be a headache at all. Now, with the voice-activated phone activation system in place on Microsoft, reactivate any of the windows copy is a much easier process.
All in all, the most concern to me on VHD running on different hardware is the device driver.
I’m confused about why you need diskpart?
Have you seen this video:
http://www.microsoft.com/downloads/details.aspx?FamilyID=80EDE31D-3509-407B-A896-0BEEA8705589&displaylang=en
At the end they use dispart to DETACH the VHD file then just set up the boot menu with BcdEdit
I’m wondering if i can simply format a hard drive, make it bootable with Bootsect …then copy Freedos-32 and bcdedit or easybcdedit or vhdmount to set up the vhd boot… from autoexec.bat
The goal is to prepare a hard drive so that it can be dropped into a system and go directly into the vhd with windows already setup the first time it runs.
My belief is that it’s just too tempting for someone to hack a vhd with windows 7 installed.. to run forever without activation… you can’t upgrade a vhd anyway.
Still, the drivers and hardware would have to be modified / updated to match the systems… but programs like Driver Genius Professional are already automating this problem…. and people who want their os on a larger usb drive to be usable on any computer are working on how to use the VHD for their purpose.
I was actually quoting the steps from the original post. but theoretically, the step 5 doesn’t seem to need it.
Yes, you can simply format a hard drive, and make it bootable with the bootmgr that’s compatible with Windows 7.
VHD native boot runs just like the physical machine, so I don’t think the activation part can be easily bypassed. But non-upgradable in a VHD is really a downside to me. Hope they can make it work in a later version.
Terry, you made a good point of Diver Genius Professional. I may check it out later. However, if you’d like do a guest post about it feel free let me know.
Actually I have figured out that you don’t need Windows PE, you can boot from a windows install cd… or you can create a bootable USB drive by formatting it and running bootsect and copying 4 files from from the cd then set the bios to boot form the usb. Total disk space needed on the usb drive is only 210 mb. I’ve made a batch file to automate this process in about a half minute.
Yes, that’s right, as another commenter pointed out and I updated in the post.
Your bootable USB drive is a good one too.
how do you do that specifically. what files do i need?
Thanks a lot Kent. I just tried this out and it worked great (with one exception). I can confirm that ONLY the Enterprise and Ultimate versions of Windows 7 support BOOTING from a VHD.
The exception i mentioned earlier was that on step 5, the line that reads: DISKPART>SEL VDISK C:\VHD\Win7.vhd is missing “file=” between “VDISK” and the path to the VHD file.
It should read like this:
DISKPART>SEL VDISK FILE=C:\VHD\Win7.vhd
Thanks Elier. Glad it worked out for you.
I have updated the post so the missing “file=” is now back.
Cheers.
Thanks Terry. that's a good point. I was going to test it out how it goes with the same VHD on different hardware. However, here are my opinions that tops off my head to the things you mentioned.
It shouldn't matter when BIOS doesn't match, because the most incompatible part is the device driver.
Registration is never be an issue in any version. Yes, it most likely that you will need to reactivate the Windows but if you have the legit copy that shouldn't be a headache at all. Now, with the voice-activated phone activation system in place on Microsoft, reactivate any of the windows copy is a much easier process.
All in all, the most concern to me on VHD running on different hardware is the device driver.
Portlock Leap Frog will also enable VHD boot. It will allow you to keep Windows XP or Vista, and upgrade their respective boot managers to support VHD boot. Once the Dual boot environment is setup and you are booting into Windows 7 or a preconfigured VHD, its very easy to do what you need to do without having to worry about the AIK or Diskpart command lines.
Portlock Leap Frog will also enable VHD boot. It will allow you to keep Windows XP or Vista, and upgrade their respective boot managers to support VHD boot. Once the Dual boot environment is setup and you are booting into Windows 7 or a preconfigured VHD, its very easy to do what you need to do without having to worry about the AIK or Diskpart command lines.
Correct Native boot is only possible with Win7 Enterprise or Ultimate.
@Daren,
Thanks for the info. It looks like a pretty good product that fills in this gap pretty well. Please email me info at windows7hacker.com if you have relationship with or work at Portlock.
Cheers.
Hi, I'm stumped…
I followed the instructions on the Technet site (skipping steps 2 and 3) to make a WinPE bootable UFD. I am able to boot into WinPE, however:
DISKPART does not allow me to select, attach, etc VDISKs. It's just not even an option: VDISKs are not recognized. It's almost as if I'm using XPs DISKPART (i DO have XP as the host OS on the hard drive, but per your post, it shouldn't matter what the OS is as long as bootmgr is changed).
any insights? I am doing something wrong. I've redone the WinPE UFD a couple of times to make sure that everything is correct, but DISKPART still doesn't work correctly.
Thanks in advance,
AS
yes, you probably are still using the XP version of DiskPart. Have you done the step 4 successfully? This is a very important step, as only the version in Windows 7 supports the native boot VHD.
Cheers
oh boy! Thanks for the reply, but I did something stupid! I mistakenly used the Vista AIK instead of Win7. Have now downloaded the correct one and can manipulate VDisks in Diskpart under WinPE. btw, your link to WIN7 AIK is broken…
another Q: Can the .vhd be located on an external hd? like so: my pc allows boot from usb drive – > I place the .vhd on an external drive, keep xp on my internal drive, and boot into the Win7 vhd on the external drive. Can this be done?
thanks in advance,
AS
thanks for pointing it out the broken link. It's now been updated.
Yes, I agree that it would be nice to locate the VHD on an external hard drive. and I know some of the guys who may have done it. check the commends thread of this post and the post below to see if you can find more information about VHD on external hard disk. Personally, I tried but didn't succeed.
http://www.windows7hacker.com/index.php/2009/08...
Cheers.
oh boy! Thanks for the reply, but I did something stupid! I mistakenly used the Vista AIK instead of Win7. Have now downloaded the correct one and can manipulate VDisks in Diskpart under WinPE. btw, your link to WIN7 AIK is broken…
another Q: Can the .vhd be located on an external hd? like so: my pc allows boot from usb drive – > I place the .vhd on an external drive, keep xp on my internal drive, and boot into the Win7 vhd on the external drive. Can this be done?
thanks in advance,
AS
thanks for pointing it out the broken link. It's now been updated.
Yes, I agree that it would be nice to locate the VHD on an external hard drive. and I know some of the guys who may have done it. check the commends thread of this post and the post below to see if you can find more information about VHD on external hard disk. Personally, I tried but didn't succeed.
http://www.windows7hacker.com/index.php/2009/08...
Cheers.