Jump to content

Boot Windows 7 from VHD - an amazing concept


Recommended Posts

as far as I can see, WEI cannot be calculated for VHD installs.
I'm not sure about earlier incarnations, since this is my first VHD version but yes for the WEI I get a message telling me that it is unable to assess storage whilst in a VHD, as part of the WEI calculation and exits.

I also have this issue. Why is the calculation of the hdd is disabled when you install Windows 7 into a VHD? Does anyone know WHY MS disabled this?

Link to comment
Share on other sites

I'm not entirely sure, but I'd think it would have to do with all of the oddities of booting a stub OS and a vhdfilter that perhaps they've been unable to get reliable scoring? I dunno for sure.

Link to comment
Share on other sites

1. Install Windows 7 to VHD from DVD


With Windows 7, you now have the option to boot the OS from a VHD, a virtual disk file, instead of a partition. This way, you don't have to reconfigure your hard drive partitions.

Limitations: Hibernate is not supported.

Here are the simplified instructions:

1) Start Windows 7 installation from DVD.

2) Press Shift+F10 to start the command prompt.

3) Start diskpart.

4) Use the "create vdisk file=D:\Win7.vhd maximum=xxxxx" to create a virtual hard disk. Choose your drive and filename accordingly. xxxxx is in MB.

5) Type "select vdisk file=D:\Win7.vhd".

6) Type "attach vdisk". You will get a confirmation that it was attached.

7) Type "exit" to exit diskpart. And then close the command prompt.

8) Click on "Install Now" and install as you would normally by clicking on "Custom Install". Choose your attached vdisk as the location.

The installation takes care of adding the boot option to bcd. You don't have to do anything.

Just registered here for the sole purpose of saying THANK YOU!!! :thumbup :thumbup :thumbup :thumbup

I've been wanting to install Win 7 beta ever since its release, but didn't want to create a new partition, and this was the exact kind of thing I was looking for...very cool, dude.

Installed it the first time to the VHD following your instructions, and it works GREAT!!

I must say the features of Win 7 are bad-a**, and its a far superior OS than Vista...it is everything Vista is not.

Very sweet OS (at its present state at least)...now MS better just not screw it up badly by the time of its final release! I like it very much the way it is now, so I hope the final release doesn't stray too far from that.

Thanks very much, dude.

My sincere appreciation for finding these wonderful instructions. Got pointed to here from another forum on which I am a frequent member, and so I think I should maybe go thank him too... :whistle:

Thanks again. :thumbup

Edited by Jake
Link to comment
Share on other sites

  • 2 weeks later...

This might be a dumb question as ive literally just stumbled across this and asking the first thing that comes to mind....

If you can put Windows 7 on to a VHD and boot from it then its loading on its own without having to be inside an OS to load the VHD, like if you were to use VMWorkstation etc, so presumably multiboot is possible and then have multiple VHD's on your hard drive? Say a WinXP VHD and Win7 VHD and choose which one to boot?

Link to comment
Share on other sites

Multiboot is possible with multiple VHD and multiple physical and any combination thereof, as long as the OS supports VHD boot. Windows XP does not support VHD boot as therefore, you cannot boot XP from a VHD and no one has come up with a work-a-round yet. You can multiboot XP on physical and Windows Vista/7 on a VHD though.

Link to comment
Share on other sites

is it possible to install Vista to a VHD when I first boot from Win7 DVD and create the VHD from setup and attach it, now reboot and start Vista Setup? Will Vista recognize the VHD as a hdd partition?

Well, although booting XP from VHD is out of the question right now, theoretically, Vista can be booted from VHD, although I don't know if anyone has tried it.

The thing is when you create the VHD in Windows 7 setup, you have to attach it using diskpart so that it's recognized during setup. Now if you attached it in windows 7 setup, then reboot, then it gets detached automatically since it's a software-driver driven HDD, and not a physical HDD. So, no! Vista will not recognize it.

Moreover, Vista's diskpart does not support attaching VHD's as far as I know. So you cannot use Vista's setup to attach a VHD and install Vista.

So, the only way to boot physically boot Vista from a VHD (theoretically) is to install it in Virtual PC, then sysprep, then add the VHD boot entry, then boot from it. You will need windows 7 installed, however, because windows 7 bootmgr supports vhd boot and vista's bootmgr does not. If you check the bootmgr size, you'll see that they are different. this is only theoretical, of course, and i haven't tried it. but you can be the first!

Link to comment
Share on other sites

I can't use VirtualPc to install Windows Vista. I've always get error messages. I gave it up.

And I also got a Bugcheck 0x136 on my host Windows 7 where I hosted the VHD with a message "not enough free space". How much free space must I have on the host to boot a Windows 7 from a VHD?

Link to comment
Share on other sites

  • 3 weeks later...
... is to install it in Virtual PC, then sysprep, then add the VHD boot entry, then boot from it.

You will need windows 7 installed, however, because windows 7 bootmgr supports vhd boot ...

Firstly, let me thank you with the same enthusiasm that "Jake" did, above.

This is awesome... :thumbup

Next, me being a dummy of sorts, can you explain exactly what the term "sysprep" means to do, in the

above quote?

I have the Win 7 RC in a vhd, boots fine, etc. I do understand everything you've written thus far,

but do not understand what the "sysprep" is, or -how to do it-.

I've got various OS's as .vhd under MS Virtual PC 2007 SP1, and would like to put one or more under the

Win 7 bootmgr, just for testing fun, but will have to "sysprep" their copies beforehand, I guess...

Thanks again for your amazing post and thank you for any further assistance.

Best regards,

Chuck R.

Link to comment
Share on other sites

Sysprep "generalizes" the OS back to (as much as possible) as pristine and unused a state as is possible. This process is actually documented pretty well on Technet, part1 and part2, so I suggest reading these a bit if you're confused.

Link to comment
Share on other sites

  • 4 weeks later...

not exactly sure but a thought might be to overwrite all existing cased of vista's bootmgr with windows 7's bootmgr on dvd and all install.wim images. thus, when copied to hdd, they will be the new one.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...