MSFN Forum: Boot Windows 7 from VHD - an amazing concept - MSFN Forum

Jump to content


Windows 7 forum rules

If you have questions about customizing Windows 7 that are vLite-specific, please post them in the vLite forum, not here. If you have questions regarding the unattended installation of Windows 7, please post them in the Unattended Windows 7/Server 2008 R2 section.
  • 5 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Boot Windows 7 from VHD - an amazing concept Here's how to do it

#21 User is offline   ra_27y 

  • Newbie
  • Group: Members
  • Posts: 12
  • Joined: 12-September 03

Posted 27 February 2009 - 04:22 AM

I like to give it a go to see when you get it install make a backup copy of the VHD file.

then I lke to make my system die then put the backup VHd in place of the old one that was dead and see if the system will boot up and work like before it die.

cause if that work then that be a great one to do a backup of my system.

only thing I don't now what would happen if the MBR die I guest that it still would kill the hole system.

what you thin? worth a try out?


#22 User is offline   amigafan 

  • Junior
  • Pip
  • Group: Members
  • Posts: 52
  • Joined: 24-April 04

Posted 02 March 2009 - 09:12 AM

View Postcluberti, on Feb 5 2009, 11:52 AM, said:

I'm not talking about a Live CD here, or firing up Qemu for a VM to run Linux from inside Windows (VHD boot is *not* a virtual machine) - what are you speaking of, and where's the documentation? I cannot find any, nor do I remember ever finding this in BeOS, specifically, either. I'd like to see some documentation if I'm wrong.



I wasn't talking about LiveCDs or VMs either. Back in 1999 my PC had one FAT32 partition (Win95), onto which I installed QNX, BeOS and Mandrake. These 3 operating systems each created a file of around 500MB, which was a HD image. The bootloader/kernel and/or some other essential parts were launched from inside Win95, which was then shut down and the alternative OS booted.

Your Google skills must be poor, I found this info about BeOS on the second page of results.

For details about QNX, the first page of results throws up the necessary info.

Well, that's proved me right, I won't bother finding something that proves Mandrake used the same technology.

#23 User is offline   cluberti 

  • Gustatus similis pullus
  • Group: Supervisor
  • Posts: 11,208
  • Joined: 09-September 01
  • OS:Windows RT
  • Country: Country Flag

Posted 02 March 2009 - 09:26 AM

I stand corrected, looks like Be did this in 2000. The QnX one I knew about, but it requires DOS to load and a few drivers, so it's not self contained. Be appears to be, however, so it counts.

And my google-foo is good, it's just that all 8 people who used BeOS didn't really document anything in depth regularly, and the Be archives aren't exactly easily searchable.

#24 User is offline   spacesurfer 

  • Pharmassist
  • Group: Patrons
  • Posts: 1,668
  • Joined: 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 11 March 2009 - 05:04 PM

The instructions have been updated to include

Adding an existing VHD to boot menu,
Enabling Vista to be able to boot VHD, and
Removing VHD boot entries

#25 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,364
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 03 April 2009 - 11:10 AM

Two quick questions…

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


#26 User is offline   spacesurfer 

  • Pharmassist
  • Group: Patrons
  • Posts: 1,668
  • Joined: 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 03 April 2009 - 11:27 AM

View PostYzöwl, on Apr 3 2009, 01:10 PM, said:

Two quick questions…

  • Can I install a Win7 x64 VHD into a Vista x86 OS root.
  • 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.

#27 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,364
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 04 April 2009 - 06:58 AM

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?

#28 User is offline   spacesurfer 

  • Pharmassist
  • Group: Patrons
  • Posts: 1,668
  • Joined: 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 04 April 2009 - 08:51 AM

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.

#29 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,364
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 04 April 2009 - 10:59 AM

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.

#30 User is offline   cluberti 

  • Gustatus similis pullus
  • Group: Supervisor
  • Posts: 11,208
  • Joined: 09-September 01
  • OS:Windows RT
  • Country: Country Flag

Posted 04 April 2009 - 11:27 AM

View PostYzöwl, on Apr 4 2009, 12:59 PM, said:

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.

#31 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,364
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 05 April 2009 - 06:45 AM

Cool tool! thanks for the thought
Posted Image

#32 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,981
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

  Posted 09 April 2009 - 04:42 PM

View Postspacesurfer, on Apr 4 2009, 04:51 PM, said:

as far as I can see, WEI cannot be calculated for VHD installs.


View PostYzöwl, on Apr 4 2009, 06:59 PM, said:

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?

#33 User is offline   spacesurfer 

  • Pharmassist
  • Group: Patrons
  • Posts: 1,668
  • Joined: 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 10 April 2009 - 08:37 AM

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

#34 User is offline   cluberti 

  • Gustatus similis pullus
  • Group: Supervisor
  • Posts: 11,208
  • Joined: 09-September 01
  • OS:Windows RT
  • Country: Country Flag

Posted 10 April 2009 - 09:39 AM

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.

#35 User is offline   Jake 

  • Group: Members
  • Posts: 2
  • Joined: 11-April 09

  Posted 11 April 2009 - 01:44 AM

View Postspacesurfer, on Feb 3 2009, 03:11 PM, said:

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

This post has been edited by Jake: 11 April 2009 - 01:45 AM


#36 User is offline   Lagerstars 

  • Newbie
  • Group: Members
  • Posts: 21
  • Joined: 24-January 09

Posted 23 April 2009 - 09:57 PM

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?

#37 User is offline   spacesurfer 

  • Pharmassist
  • Group: Patrons
  • Posts: 1,668
  • Joined: 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 24 April 2009 - 06:31 AM

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.

#38 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,981
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 24 April 2009 - 09:31 AM

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?

#39 User is offline   spacesurfer 

  • Pharmassist
  • Group: Patrons
  • Posts: 1,668
  • Joined: 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 24 April 2009 - 11:33 AM

View PostMagicAndre1981, on Apr 24 2009, 11:31 AM, said:

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!

#40 User is offline   MagicAndre1981 

  • after Windows 7 GA still Vista lover :)
  • Group: Patrons
  • Posts: 4,981
  • Joined: 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Posted 26 April 2009 - 06:57 AM

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?

Share this topic:


  • 5 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy