Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Boot Windows 7 from VHD - an amazing concept


  • Please log in to reply
119 replies to this topic

#26
spacesurfer

spacesurfer

    Pharmassist

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

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.
_____________________________________________________________________
[Modify Office 2007 / 2010 Ribbon UI] [Javascript Guide] [Methods of Typing in Gujarati] [My Math Pages]
[Boot Windows 7 from VHD] [Multi-boot Vista/XP and other OSes with Grub Menu] [Boot XP and Vista Independently]


Gigabyte GA-P35-DS3L, Intel Core 2 Duo E6550 2.33 GHz, ASUS Radeon EAH3450 256 MB, 6 GB Corsair RAM, Maxtor 300 GB + Seagate 400 GB HDDs, Windows 7 Ultimate 64-bit
IBM T42 Intel Pentium M 1.7 GHz, 1.5 GB RAM, Radeon Mobility 7500, 160 GB HDD, Windows 7 Ultimate 32-bit


How to remove advertisement from MSFN

#27
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,573 posts
  • Joined 13-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

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
spacesurfer

spacesurfer

    Pharmassist

  • Patrons
  • 1,668 posts
  • Joined 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag
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.
_____________________________________________________________________
[Modify Office 2007 / 2010 Ribbon UI] [Javascript Guide] [Methods of Typing in Gujarati] [My Math Pages]
[Boot Windows 7 from VHD] [Multi-boot Vista/XP and other OSes with Grub Menu] [Boot XP and Vista Independently]


Gigabyte GA-P35-DS3L, Intel Core 2 Duo E6550 2.33 GHz, ASUS Radeon EAH3450 256 MB, 6 GB Corsair RAM, Maxtor 300 GB + Seagate 400 GB HDDs, Windows 7 Ultimate 64-bit
IBM T42 Intel Pentium M 1.7 GHz, 1.5 GB RAM, Radeon Mobility 7500, 160 GB HDD, Windows 7 Ultimate 32-bit

#29
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,573 posts
  • Joined 13-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

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
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,253 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag

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.
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#31
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,573 posts
  • Joined 13-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Cool tool! thanks for the thought
Posted Image

#32
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,159 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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?
Posted Image

#33
spacesurfer

spacesurfer

    Pharmassist

  • Patrons
  • 1,668 posts
  • Joined 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag
It's really not an "issue" since it worked on earlier builds. MS just disabled it for current builds. Perhaps cluberti has an insight?
_____________________________________________________________________
[Modify Office 2007 / 2010 Ribbon UI] [Javascript Guide] [Methods of Typing in Gujarati] [My Math Pages]
[Boot Windows 7 from VHD] [Multi-boot Vista/XP and other OSes with Grub Menu] [Boot XP and Vista Independently]


Gigabyte GA-P35-DS3L, Intel Core 2 Duo E6550 2.33 GHz, ASUS Radeon EAH3450 256 MB, 6 GB Corsair RAM, Maxtor 300 GB + Seagate 400 GB HDDs, Windows 7 Ultimate 64-bit
IBM T42 Intel Pentium M 1.7 GHz, 1.5 GB RAM, Radeon Mobility 7500, 160 GB HDD, Windows 7 Ultimate 32-bit

#34
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,253 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag
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.
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#35
Jake

Jake
  • Member
  • 2 posts
  • Joined 11-April 09

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, 11 April 2009 - 01:45 AM.


#36
Lagerstars

Lagerstars

    Newbie

  • Member
  • 21 posts
  • Joined 24-January 09
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
spacesurfer

spacesurfer

    Pharmassist

  • Patrons
  • 1,668 posts
  • Joined 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag
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.
_____________________________________________________________________
[Modify Office 2007 / 2010 Ribbon UI] [Javascript Guide] [Methods of Typing in Gujarati] [My Math Pages]
[Boot Windows 7 from VHD] [Multi-boot Vista/XP and other OSes with Grub Menu] [Boot XP and Vista Independently]


Gigabyte GA-P35-DS3L, Intel Core 2 Duo E6550 2.33 GHz, ASUS Radeon EAH3450 256 MB, 6 GB Corsair RAM, Maxtor 300 GB + Seagate 400 GB HDDs, Windows 7 Ultimate 64-bit
IBM T42 Intel Pentium M 1.7 GHz, 1.5 GB RAM, Radeon Mobility 7500, 160 GB HDD, Windows 7 Ultimate 32-bit

#38
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,159 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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?
Posted Image

#39
spacesurfer

spacesurfer

    Pharmassist

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

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!
_____________________________________________________________________
[Modify Office 2007 / 2010 Ribbon UI] [Javascript Guide] [Methods of Typing in Gujarati] [My Math Pages]
[Boot Windows 7 from VHD] [Multi-boot Vista/XP and other OSes with Grub Menu] [Boot XP and Vista Independently]


Gigabyte GA-P35-DS3L, Intel Core 2 Duo E6550 2.33 GHz, ASUS Radeon EAH3450 256 MB, 6 GB Corsair RAM, Maxtor 300 GB + Seagate 400 GB HDDs, Windows 7 Ultimate 64-bit
IBM T42 Intel Pentium M 1.7 GHz, 1.5 GB RAM, Radeon Mobility 7500, 160 GB HDD, Windows 7 Ultimate 32-bit

#40
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,159 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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?
Posted Image

#41
e-t-c

e-t-c

    WHS 2003 SP2

  • Member
  • PipPip
  • 173 posts
  • Joined 13-March 06
  • OS:2003 x86
  • Country: Country Flag
Gizmo Central (Drive) http://arainia.com/software/gizmo can also mount VHD Images ... :)

http://www.msfn.org/...p...st&p=856454

cheers
... to exercise patience - and beside learning to l(i)(o)(ea)ving (at the right time) ^L^...

#42
chuckr

chuckr

    Newbie

  • Member
  • 11 posts
  • Joined 31-December 06

... 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.

#43
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,253 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag
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.
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#44
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,159 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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?
Posted Image

#45
spacesurfer

spacesurfer

    Pharmassist

  • Patrons
  • 1,668 posts
  • Joined 31-July 04
  • OS:Windows 7 x86
  • Country: Country Flag
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.
_____________________________________________________________________
[Modify Office 2007 / 2010 Ribbon UI] [Javascript Guide] [Methods of Typing in Gujarati] [My Math Pages]
[Boot Windows 7 from VHD] [Multi-boot Vista/XP and other OSes with Grub Menu] [Boot XP and Vista Independently]


Gigabyte GA-P35-DS3L, Intel Core 2 Duo E6550 2.33 GHz, ASUS Radeon EAH3450 256 MB, 6 GB Corsair RAM, Maxtor 300 GB + Seagate 400 GB HDDs, Windows 7 Ultimate 64-bit
IBM T42 Intel Pentium M 1.7 GHz, 1.5 GB RAM, Radeon Mobility 7500, 160 GB HDD, Windows 7 Ultimate 32-bit

#46
MagicAndre1981

MagicAndre1981

    after Windows 7 GA still Vista lover :)

  • Patrons
  • 6,159 posts
  • Joined 28-August 05
  • OS:Vista Ultimate x86
  • Country: Country Flag

Donator

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 :(
Posted Image

#47
net_user

net_user

    Advanced Member

  • Member
  • PipPipPip
  • 371 posts
  • Joined 02-June 05
  • OS:Windows 7 x86
  • Country: Country Flag
can this be done with all versions of win7?
ie..home..pro..ultimate
Hex:
526573697374616e636520697320667574696c6521

A+

#48
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,253 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag

can this be done with all versions of win7?
ie..home..pro..ultimate

Officially supported, no - but works, yes.
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#49
tomcom2k

tomcom2k
  • Member
  • 9 posts
  • Joined 19-February 06
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

#50
unawave

unawave

    Newbie

  • Member
  • 20 posts
  • Joined 13-September 09

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 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users