Skip to main content

Install Windows 8 to VHD for Easy Dual Booting

Posted August 2012 by Steve Sinchak

Windows 8 supports installing to a virtual hard disk file called a VHD for non-traditional dual boot setups. Instead of dividing your hard drive into multiple partitions typically required for dual booting multiple operating systems, booting to a VHD allows you to keep your primary OS untouched and instead boot to a VHD file on the same file system. This make it very easy to try Windows 8 on your native hardware while having a Windows 7 safety net that you can access with just a reboot.

The first step to installing Windows 8 to a VHD file is to create the VHD file.  This can be accomplished with the diskpart utility but I think it is much easier to use the  graphical disk management utility. Open the Start Menu and type in diskmgmt.msc and hit enter.

Then click on Action and select Create VHD.

Enter a location and name for your vhd.  I typically use c:\vhd\win8.vhd.

Microsoft recommends a minimum of 20 GB for Windows 8 64-bit. I suggest setting the VHD disk size to at least 40 GB so you have room for apps.

For best performance select a fixed size disk but I typically use dynamically expanding disks to save on disk space.  The difference is a fixed size disk of 40 GB will create a 40 GB VHD file on your file system right away.  Where a dynamically expanding disk grows only as space is used.  For example, a 40 GB dynamic VHD after installing Windows 8 could take up only 14 GB of actual disk space.

When you have your settings selected, click OK.

Next, reboot your computer and boot up with a Windows 8 DVD or USB Flash drive.  Proceed through the custom install until you get to the Where do you want to install Windows? screen.  At that point hit Shift and F10 to bring up a command prompt.

The VHD file that you created earlier needs to be attached so you can select the VHD as the install destination.  Once the command prompt is open, run the following:

diskpart

select vdisk file=d:\vhd\win8.vhd

attach vdisk

Replace d:\vhd\win8.vhd with the full path to the VHD file you created.  The drive letter may be different for you.  In fact, on my Windows 7 installs there is a hidden boot partition which makes the C drive in Windows 7 actually get assigned the D drive letter when booting up with the Windows 8 installer or any Windows PE disc. That is why in the example above I created the VHD in c:\vhd\ on Windows 7 but in the Windows 8 installer I had to use d:\vhd.

At this point return to the Where do you want to install Windows? screen and click the refresh icon or hit F5.  You should see a new partition, which is actually the attached VHD, displayed. Select it and continue installing Windows 8 as usual.

Related Posts


Microsoft Edge on Windows 10 includes the Windows Defender SmartScreen service for years that prevents users from accidentally browsing to known malicious and fake phishing websites. While Microsoft Edge is a great browser and has many very strong security features, Microsoft understands that many people choose to use Google Chrome.  As such, Microsoft still cares about the security of the web browser...

Read More

It happens every few months.  My operating system drive runs out of space, and I must begin the hunt for things to delete or move to another drive. As a first step using a cleanup utility such as CCleaner is helpful, but it only finds the easy targets such as temporary files. Unfortunately, deleting these files does not typically...

Read More

If you are among the millions of “cord cutters” that are saying goodbye to cable and satellite, or if you just want to gain access to the dozens of free channels broadcast over-the-air then this article is for you.  Similar to tuning in over-the-air channels on a TV you will need an antenna and a tuner to receive local TV channels. In order to watch TV on Windows 10 I like to use HD Homerun network...

Read More

Shopping for a hard to find item on Amazon.com that is always sold out? I was recently on the hunt for an external GPU enclosure that would show up in small quantities on Amazon.  After failing to snag one by randomly checking periodically, I figured there must be a better way. Microsoft Flow to the rescue!

Read More