Windows

Dual-boot Windows 7 and Windows 8 using a VHD

Greg Shultz shows you how to prepare and configure your Windows 7 system to dual-boot Windows 8 from a VHD.

In my last blog post, Dual-boot Windows 7 and Windows 8, I showed you how to configure your Windows 7 system to dual-boot Windows 8 from a partition on your existing Windows 7 hard disk. You can use that technique in all versions of Windows 7. However, if you have Windows 7 Ultimate or Windows 7 Enterprise, which provide the Boot from VHD (Virtual Hard Disk) feature, you can install Windows 8 on a VHD.

In this edition of the Windows Desktop Report, I'll show you how to prepare and configure your Windows 7 system to dual-boot Windows 8 from a VHD. While I'll be using the Windows 8 Release Preview for this article, I've heard that the procedure should be very similar with the actual release version. Even so, I'll revisit this topic in the near future once Windows 8 is available to the general public.

This blog post is also available in the slideshow format in a TechRepublic Photo Gallery.

Editor's Note: Since this article was published, it has been discovered that Native VHD Boot is available in all versions of Windows 7, which means that you can set up a Windows 8 dual-boot configuration in Windows 7 Home Premium. See the article Native VHD Boot is available in all versions of Windows 7 for more detail.

Prerequisite

For this article, I'm going to assume that you have already visited the Windows 8 Release Preview site and followed Microsoft's instructions for downloading and converting the ISO file to a DVD in Windows 7. If you haven't, you should do so before you get started with this article. The process is pretty straightforward and Microsoft has documented the steps you need to follow.

Creating a System Image

The first thing that you'll want to do is create a System Image from within Windows7's Backup and Restore. When you do, you'll end up with a complete image of your hard disk. That way, if anything out of the ordinary were to occur as you follow the steps for creating a dual-boot system, you will be able to return to your current configuration. Furthermore, I recommend that you also create a separate backup of your data. Maybe just make copies of all your data files on CD/DVD or on an external hard disk. While it may sound like overkill, having an extra backup will give you peace of mind.

To create a system image, you'll need to have a CD-RW/DVD-RW drive, an external hard disk, or access to a network drive. To access Backup and Restore, click the Start button, type Backup in the Search box, and press [Enter] when Backup and Restore appears in the result pane.

Once you have Backup and Restore up, select the Create a System Image option and choose your backup location. As you can see in Figure A, I used an external hard disk attached to this system.

Figure A

On my test system, I'll use an external hard disk to create my system image.
As you can see in Figure B, on this test system there is only one partition. To initiate the operation, just click Start backup. On my test system with a 500GB hard disk, it took just over an hour to create a System Image on an external hard disk.

Figure B

Creating a System Image on an external hard disk is easy.
When the System Image is complete, you'll be prompted to create a System Repair disc, as shown in Figure C. This is the disc that you will use to boot your system and restore your system image in the event that you need it.

Figure C

When the System Image is complete, you'll be prompted to create a System Repair disc.

Setting up a VHD

With your System Image completed, you'll use the Disk Management tool to create the VHD on which you will install Windows 8. To launch Disk Management, click the Start button, type Disk Management in the Search box, and press [Enter] when Create and format hard disk partitions appears in the result pane. When Disk Management launches, pull down the Action menu and select the Create VHD command, as shown in Figure D.

Figure D

You'll select the Create VHD command from the Action menu.

When you see the Create and Attach Virtual Hard Disk dialog box, click the Browse button and use the Browse dialog box to create a folder and specify a name for your VHD file.

As you can see in Figure E, I have created a folder called VHDs in the root directory and named the VHD file Windows8RP.vhd. You will then specify a disk size and disk format. I have specified the size as 50GB and set it up as a Fixed size. You can use whatever size you want and choose Dynamically expanding format if you wish, just be sure that you have enough room on the hard disk to accommodate your VHD. (If you look back at Figure D, you can see that on my test system I have 350GB of free space and specifying a 50GB Fixed size VHD was an easy choice.)

Figure E

For my example VHD I choose a 50GB Fixed disk.
When you click OK, Disk Management will go to work creating the new VHD file. As it does so, you will see the progress in the Status bar, as shown in Figure F.

Figure F

Disk Management displays the VHD creation progress in its Status bar.
It will take a few minutes to create a Fixed size VHD file. When the VHD is complete, you will see the new disk in Disk Management, as shown in Figure G. Here you can see that my 50GB VHD is listed as Disk 2 and will notice that it is also marked as Unknown, Not Initialized, and Unallocated. Don't worry; we'll take care of establishing the disk during the Windows 8 installation procedure. A this point, you can close Disk Management.

Figure G

The new VHD will be marked as Unknown, Not Initialized, and Unallocated.

Installing Windows 8

Now that you have your VHD established, installing Windows 8 in a dual-boot configuration should be a pretty straightforward operation. Let's take a closer look.

To begin, insert the Windows 8 Release Preview DVD and reboot your system. After a few minutes, you'll see the Windows Setup screen shown in Figure H and will specify your language settings before clicking Next.

Figure H

The first step in the installation is to specify your language settings.
Once the initial steps are taken care of, you'll see the Windows Setup screen shown in Figure I and will click the Install Now button. However, keep in mind that we aren't exactly ready to install Windows just yet; you must first access your VHD.

Figure I

While you will click the Install Now button, you're not quite ready to install Windows 8.
When you see the next Windows Setup screen, you will immediately press Shift +F10 to open an Administrator Command Prompt window as shown in Figure J.

Figure J

When you press Shift-F10, you'll see an Administrator Command Prompt window.

To prepare your VHD you'll use the command Diskpart utility. Follow these steps:

  • Type the command:
diskpart
  • Once the Diskpart environment is ready, you'll use the select command to instruct Diskpart to access your VHD file as follows:
select vdisk file=c:\VHDs\Windows8RP.vhd
  • After you have selected the VHD file, you'll use the attach command to essentially connect the VHD to your system as follows:
attach vdisk
This entire procedure is illustrated in Figure K.

Figure K

After each command, you should see a success message.
Once you are done, you can type exit to leave the Diskpart environment and then click the Close button the close the Administrator Command Prompt window. When you return to the Windows Setup screen, you select the Custom option, as shown in Figure L.

Figure L

Make sure that you select the Custom Install Windows only option.

At this point, Windows Setup will prompt you to choose the location to which you want to install Windows 8 and you can now select your VHD, which will be designated as Unallocated Space and be the size that you specified.

As you can see in Figure M, I have selected my 50GB VHD. Keep in mind that when you select the VHD, you'll see a Warning message that says that Windows cannot be installed to this disk. Even though Windows Setup displays this warning message, you can ignore it as the procedure does indeed function correctly. In fact, the installation procedure will progress quite rapidly and restart several times as it completes the installation on the VHD - just like it would on a normal hard disk.

Figure M

Select your VHD drive, ignore the warning message, and click Next.
As soon as you click Next, the installation will begin, as shown in Figure N. This part of the operation will take a while so go get yourself a cup of coffee.

Figure N

As soon as you click Next, Windows Setup will begin copying files to the new partition.

Dual-booting Windows 7 and Windows 8

When the installation is complete, Windows Setup will reboot your system one final time and you will then see the new Windows 8 style dual boot screen shown in Figure O. As you can see, Windows 8 will automatically launch in 30 seconds if you don't choose Windows 7.

Figure O

The new Windows 8 style boot screen display for 30 seconds before launching Windows 8.

If you want to alter the amount of time before Windows 8 runs, you can click the Change defaults or choose other options at the bottom of the screen. There are actually a multitude of options that you can change and I'll cover all of them in a future article.

What's your take?

What do you think about being able to create bootable Windows 7 VHDs that run like a dual boot setup? Will this be something that you will use to test Windows 8? As always, if you have comments or information to share about this topic, please take a moment to drop by the TechRepublic Community Forums and let us hear from you.

Also read:

About

Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

28 comments
shod90
shod90

MANY THANKSSSSS :D

XTGX
XTGX

Thanks Mr Greg For such a nice article . i followed the steps as instructed  when my installation Process reached the 

Figure N

and were Finishing up  i got the  following error 

"windows could not update the computer's boot configuration windows.Installation Cannot Proceed"


I am Using windows 8 x64 on hp 630 NoteBook 

any suggestion / solution will be appretiated.

ac?cio
ac?cio

I actually sugest doing this without any native system installed... Keeping in mind that windows doesnt install to a micro sdcard, i did it by booting hiron's boot windows 7 mode on it... allocating a VHD to Micro SD card keeping the first disk clean to instal ubuntu and android x86 with native ethernet card build to kernell. Grub does the fisrt boot loading.

colin
colin

I never got any further than install now as it immediately said I had a media driver missing and to put in a cd/dvd with the driver on. It didn't tell me what was missing (typical microsoft) other than a DVD, USB or HDD. Couldn't get past it, anyone any ideas.

kwolfdds
kwolfdds

I'm not sure what I'm doing wrong, but no matter how I do the vhd in W7, when I reboot into W8 RP and go to diskpart and try to select the vhd I just made, it is not found. I have made the vhd as per the directions above exactly, and also initializing the vhd, etc. What am I doing wrong? I'm using a DVD of W8 RP 32 bit that I have successfully loaded onto this exact same laptop on a different hard drive. I have enabled virtualization in the BIOS and disabled it, all with the same results: dispart has encountered an error....virtual disk not found. Laptop is a Dell Vostro 1700 that has run W8 RP quite well. Any ideas?

eidris
eidris

Just a question... If I need to revert back to win7 after configuring the above. Do I just need to remove the VHD file or I have to restore from backup via system restore) ?

senderj
senderj

my win8 installation screens are very much different. Mine didn't have the language selection. It first prompt for what data I want to keep: data+apps; data or nothing. Then it did some scanning and after a few screen it said Ready to Install, without asking me which partition to target at. I didn't proceed further afraid of overwriting my win7 installation. Why was it so? anybody has the same experience?

spiras
spiras

- could you explain what is the benefit of using the VHD method over the direct installation on separate partition method when installing Win8? Thanks.

frank_s
frank_s

OK, this worked fine for me when I first saw it, now how do I remove the Win 8 installation?

Trentski
Trentski

Its probably easier than using a real dvd, but not having to install oracle virtualbox would be good

MikeChiles
MikeChiles

Greg, my thanks as well for a really useful tutorial. I already have a dual-boot system with Win7 and Ubuntu 12.04. I'm running Win8 in a VirtualBox environment in order to test it out. Could I use the process you have described above to install Win8 rather running it in a virtual environment? Would the startup screen then give me the option of Win8, Win7 and Ubuntu?

peter.gibbins
peter.gibbins

Hi greg.. really useful article - I teach students to install multiple operating systems and this will help enormously. Did you miss out a step? I've not used VHD - but you create a drive which is unnamed and then in the admin command window you refer to a VHD file named "Windows8RP.vhd" Thanks again Peter

lehnerus2000
lehnerus2000

The VHD gives you the benefit of using your real hardware instead of virtual hardware. The only problem I noticed using a VHD was that I couldn't upgrade from W8CP to W8RP (I had to create a new VHD).

golan44
golan44

Thanks Greg, your article is a great straight forward way to evaluate Windows 8 without having to spend $$ on new hardware. Nicely Done!

Greg Shultz
Greg Shultz

...devices connected to your system? Thumbdrive? External hard drive? Scanner? If so, try disconnecting/removing them before the install.

kwolfdds
kwolfdds

Found the problem. Once I was in the command prompt, but before I did the diskpart, I did a dir c: and found out that there was no folders there! Did a dir d: and found my hard drive folders there. Once I did the diskpart in d, I was able to attach my vhd and install W8 with no problem. Hope this helps someone else.

Greg Shultz
Greg Shultz

...the answer is yes, you just delete the VHD and then remove the boot menu. (no need for a system restore) Stay tuned for this week's article in which I walk you step-by-step through the entire procedure.

rkuhn040172
rkuhn040172

Senderj...you have to reboot and boot off the DVD of Windows 8 and then start the installation. You (I did the same thing initially) are trying to do the install from inside Windows 7.

Greg Shultz
Greg Shultz

...of using a VHD is that it is easy. You simply create a file rather than a repartitioning your hard disk. When you are done with it, you just delete the file, no repartitioning. Of course, repartitioning your hard disk in Windows 7 is a lot easier than it used to be, thanks to the new features in Disk Manager. However, it is a bit more time-consuming. So really, choosing a VHD over a partition boils down to whether or not it is available in your version of Windows 7 and what you feel more comfortable with. (Booting from a VHD is only available in Windows 7 Ultimate and Enterprise)

Greg Shultz
Greg Shultz

...is easy. Boot to Windows 7, delete the Windows 8 VHD file, and then alter the boot menu. To do so, run System Configuration via "msconfig.exe" as an Administrator, access the Boot tab and delete the Windows 8 option.

Greg Shultz
Greg Shultz

...how things will turn out in a configuration such as the one you are proposing. There are a lot of variables in your situation that are unknown to me that could have a big impact on how things work. However, a quick investigation on Google seem to indicates that there are numourous ways to triple-boot Windows7/Windows8/Ubuntu... I would suggest that you use Google and research your options. Glad to hear you liked the article. Thanks

Greg Shultz
Greg Shultz

Thanks, glad to hear that you liked the article, but there is not a missing step. It is important not to confuse the drive and the file. In the steps and in Figure E, I show you how to create a VHD file named Windows8RP.vhd. When you get to Figure G, you can see that the drive is unnamed. While the file contains the drive, the drive doesn't automatically inherit the file's name. When we get to the Administrator Command Prompt shown in Figure K, we Attach the file which essentially brings the drive to life, but the drive, or more preceisely volume, itself is still unnamed. Once Windows 8 is up and running, you can assign a name to the drive if you wish.

colin
colin

No connected devices, I have read it's pretty flaky so don't think i'll bother anyway. Pity Microsoft don't try getting it right before they preview it.

peter.gibbins
peter.gibbins

Sorry - you're right that will teach me to read the text and not just look at the pictures! :-)

lehnerus2000
lehnerus2000

"[i]Would the startup screen then give me the option of Win8, Win7 and Ubuntu?[/i]" On my PC: - I get a GRUB menu with Windows and Ubuntu options. - If I choose Windows, I get a Windows menu listing my Windows operating systems.

MikeChiles
MikeChiles

thanks for the reference, also very helpful!