hdood Posted May 5, 2009 Share Posted May 5, 2009 Figured some people might be interested in this, so here's a quick guide. Some of you might have heard that Windows 7 has the ability to boot from virtual hard drive (VHD) images, and it's this feature we will be using here. In this particular scenario the machine is running Windows XP, but it's the same for Vista. Burn the Windows 7 ISO to a DVD and boot from it. Select your language, and when you're presented with the main installation screen (the one with the big "Install now" button), hit shift +F10 (hey, you just learned a little known secret!). At the command prompt, type the following commands: Now, the above step requires a little explaining. DiskPart is a command line utility for managing your disks. You can think of it like a command line version of the "Disk Management" GUI some of you might be used to in Computer Management. The "list vol" command shows us the volumes on the machine. What we're interested in here is the drive letter of the volume we want the VHD file that will contain Windows 7 to be stored on. We want it to reside on our Windows XP partition, which is C:, so this is what we will use in the "create" and "select" commands. In this case we want to install Windows 7 on a 16GB virtual disk that is really the VHD file C:\win7rc.vhd. If you want it bigger, you can change the number in the "maximum=16384" argument (it's specified in megabytes.) Once you've created the VHD file (this takes a while, so be patient!) we tell DiskPart to make it available to the Windows 7 installer using the "select" and "attach" commands. When you have finished and have exited DiskPart with the "exit" command, close the command prompt window and hit "Install now." When prompted for the installation type, pick "Custom (advanced)." From here pick the virtual disk we created. In this screenshot the machine only has one physical hard drive, known as "Disk 0," with a 20GB partition containing Windows XP and 13MB of unallocated space. "Disk 1" is our new 16GB virtual disk where we will install Windows 7. Your disk layout might look slightly different, but you should be able to figure out which one is the virtual disk. In most cases it will be the last item in the list, and you can look at the size (16GB in this case) to verify that it's the correct one. Select it and click next. If you see a message claiming that "Windows cannot be installed to this disk," simply ignore it (it's wrong). Proceed to install Windows 7 as normal. Once it's done, you'll have a new boot menu where you can choose between Windows 7 and your other OS. This will likely show up as "Earlier version of Windows" in the boot menu, but you can change the text to whatever you want by downloading EasyBCD (a utility that lets you edit the boot menu.) The only thing to be aware of here is that using a VHD instead of a real disk does mean that you will get somewhat reduced disk performance. Don't worry too much about that though, it's plenty good enough to test it out. You could even use the technique outlined here to set up several VHDs with Windows 7 to use as a playground without having to worry about breaking anything. Link to comment Share on other sites More sharing options...
mamamamamamama Posted May 5, 2009 Share Posted May 5, 2009 Can the same thing be done by mounting the image inside xp? Link to comment Share on other sites More sharing options...
Minifig Posted May 5, 2009 Share Posted May 5, 2009 I burned the ISO, popped it in, and just installed it. I didn't even have to partition my drive. Link to comment Share on other sites More sharing options...
hdood Posted May 5, 2009 Author Share Posted May 5, 2009 Can the same thing be done by mounting the image inside xp? Unfortunately not. Only the Windows 7 disk manager understands virtual disks. I burned the ISO, popped it in, and just installed it.I didn't even have to partition my drive. The idea is that you can install it on a virtual disk without losing or overwriting your current OS. Link to comment Share on other sites More sharing options...
»X« Posted May 5, 2009 Share Posted May 5, 2009 Excellent guide. Many thanks (Y) Link to comment Share on other sites More sharing options...
Frank Posted May 6, 2009 Share Posted May 6, 2009 Moved Here Link to comment Share on other sites More sharing options...
Delebre Posted May 6, 2009 Share Posted May 6, 2009 For more neophytes that frequent the site, I have created a guided flash tutorial. You can also download the AVI if you prefer. Also, I've created an accompanying website which helps get you started as well. The site is ad-free. To view the tutorial: http://www.b3an.com/Windows7 Thanks for visiting, hope this helps some people. :) Link to comment Share on other sites More sharing options...
hdood Posted May 6, 2009 Author Share Posted May 6, 2009 Nice tutorial, however this thread is about installing Windows 7 on a virtual disk and booting it natively (i.e. without virtualization.) Link to comment Share on other sites More sharing options...
ramik Posted May 9, 2009 Share Posted May 9, 2009 ok, great method to install windows 7, i followed it on my Vista Business machine and it worked, but only for 1 boot.... after that after the bios checks i get the last step which is "Verifying DMI Pool Data.........." and then nothing, no ntldr, no bootmgr, nothing....... I have 2 physicals harddisk in the machine, with quite few partitions (1 vista, 1 data, 1 video, 1 photo, 1 mp3, 1 downloads) between those 2 physical disks. while installing i put the vhd in the data partition (in working vista it's N:, during install it was I:), first boot everything went ok, booted, installed Win7, installed few apps and driver, then i changed the boot order with bcdedit, now i can't boot anymore !!!! I tried booting again from the rc dvd and trying the bcdboot to repair bootmgr files, it finishes successfuly but i still can't boot !!!! bcdedit reports that win7 is located in v: drive, i tried chaning it to "device vhd=[i:]\win7.vhd" but still the same .... help please !!! how can i fix the main boot mbr to point to the bootmgr !! Link to comment Share on other sites More sharing options...
Pootis Spencer Posted June 9, 2009 Share Posted June 9, 2009 Is it possible, once you have installed Windows 7 into the VHD file, to move the file to an external drive and change the boot loader accordingly? Link to comment Share on other sites More sharing options...
Recommended Posts