• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
spacesurfer

Boot Windows 7 from VHD - an amazing concept

120 posts in this topic

Two quick questions…

  1. Can I install a Win7 x64 VHD into a Vista x86 OS root.
  2. Can I install it into C:\VHDs
    e.g. C:\VHDs\Windows7.vhd (if so can/does that directory have system/hidden attributes?)

I don't see why you couldn't place the VDH in the OS root. I'm got mine placed in C:\Shared\ folder in Vista.

As far as x64 vs x86, I'm going to try that on my sis's laptop, which has x86 vista pre-installed. Will post findings here.

The directory will not have hidden/system attributes on it's own. Of course, you won't be able to delete the VHD file while you've got Windows 7 loaded. When in Vista, however, you can delete that file accidentally. I'm sure you can make it system/hidden on your own while in Vista though.

0

Share this post


Link to post
Share on other sites

Just to answer my own question, Yes you can run a 64bit Win7 VHD located in a 32bit OS.

Just one question I have with the running VHD, System Properties doesn't show any installed RAM, is this usual?

0

Share this post


Link to post
Share on other sites

That's unusual. Mine shows the amount installed.

Also, after build 7068, as far as I can see, WEI cannot be calculated for VHD installs.

0

Share this post


Link to post
Share on other sites

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.

For the installed RAM, I know it's not a major thing, the RAM shows correctly as 4096 MB in the Task Manager Performance window, so I'm sure it's all working, it is just that I hate to see the empty field in that window.

0

Share this post


Link to post
Share on other sites
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.

For the installed RAM, I know it's not a major thing, the RAM shows correctly as 4096 MB in the Task Manager Performance window, so I'm sure it's all working, it is just that I hate to see the empty field in that window.

If you're on a newer build (7068 or higher) you can use resmon to look at the memory and get an accurate picture, just a thought.

0

Share this post


Link to post
Share on other sites

Cool tool! thanks for the thought

My_First_Memory.jpg

0

Share this post


Link to post
Share on other sites
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?

0

Share this post


Link to post
Share on other sites

It's really not an "issue" since it worked on earlier builds. MS just disabled it for current builds. Perhaps cluberti has an insight?

0

Share this post


Link to post
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.

0

Share this post


Link to post
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
0

Share this post


Link to post
Share on other sites

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?

0

Share this post


Link to post
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.

0

Share this post


Link to post
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?

0

Share this post


Link to post
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!

0

Share this post


Link to post
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?

0

Share this post


Link to post
Share on other sites
... 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.

0

Share this post


Link to post
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.

0

Share this post


Link to post
Share on other sites

How do I update (unattended) an existing Bootmanager (Vista) to the the new Win7 Bootmanager so that I can later add the VHD, I've created with WIM2VHD, to the Bootmenu?

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

I don't use the DVD to boot. I've converted the WIM to a VHD with WIM2VHD and now I would like to check if there is an existing Os install like WinXP or WinVista. If such an OS is detected the Bootmanager should be updated to the Win7 Bootmanager so that I can add the VHD file. On Technet I only found a way to completely clean the partition :(

0

Share this post


Link to post
Share on other sites

can this be done with all versions of win7?

ie..home..pro..ultimate

0

Share this post


Link to post
Share on other sites
can this be done with all versions of win7?

ie..home..pro..ultimate

Officially supported, no - but works, yes.

0

Share this post


Link to post
Share on other sites

Does this mean we can setup a software raid 0 in windows, then install windows 7 to a vhd disk inside that software raid 0?

as of now its impossible to install windows to a windows software raid / dynamic disk setup

0

Share this post


Link to post
Share on other sites
can this be done with all versions of win7? ie..home..pro..ultimate
Officially supported, no - but works, yes.
What do you mean with "Officially supported, no - but works, yes." ?

I have tested this:

  • Vista's boot manager ("bootmgr") can not boot VHD installations
  • Any Windows 7 boot manager ("bootmgr") can boot VHD installations
  • Only Windows 7 Ultimate can be booted from VHDs

I have made an installation of "Windows 7 Home Premium" into a VHD.

Installation process works fine - two reboots.

Then: Username, computer name, keyword, product key, date and time, network, welcome screen ...

Then:

License Error

Booting from a VHD file is not supported on this system

0

Share this post


Link to post
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.