Most of Windows users who are going to try Windows 8 will install Windows 8 in dual boot with Windows 7 or in dual boot with Windows XP. And some users may install Windows 8 on a virtual machine using VMware or VirtualBox (see how to install Windows 8 on VirtualBox or install Windows 8 on VMware).

But if you want to dual boot Windows 8 with Windows 7 without actually installing Windows 8 on a separate partition, installing Windows 8 on a VHD (virtual hard disk) is the best way to test-drive the new operating system.

Users who would like to install Windows 8 on a VHD in dual boot with Windows 7 can follow our simple instructions given below to create a VHD and then install Windows 8 on it.

Step 1: First off, download your Windows 8 ISO file from here and then burn the ISO file onto a DVD or create a bootable USB flash drive to install Windows 8 from USB flash drive.

Step 2: Connect the bootable USB drive to the computer, restart the system, and make necessary changes in the BIOS to boot from the bootable media. Once done, restart the PC and boot using the bootable media.

Step 3: Within a minute or two, you will see this screen:

Step 4: When you see the above screen, press Shift + F10 keys to open the Command Prompt. In the Command Prompt, execute the following commands one-by-one.

Diskpart

List disk

Select disk 0

(select disk number on which your Windows 7/Vista is running and make sure you don’t select your USB drive)

List vol

Create vdisk file=E:\win8.vhd maximum=30000 type=expandable

(In the above command replace “E” with the drive letter where you would like to save the VHD file. We recommend a minimum of 30,000 MB for VHD.)

Select vdisk file=E:\win8.vhd

Attach vdisk

Exit

Step 5: Exit the Command Prompt. Select your language, currency format, input method and click Next button.

Click the Install Now button. You will be asked to enter the product key. Enter Windows 8 Product key and click Next.

Step 6: Accept the license agreement and click the Next button. Click Custom: Install Windows only.

Step 7: In the following screen, select the newly created VHD. Windows setup may show “Windows cannot be installed to this disk” warning. Ignore the warning and click the Next button to begin the installation. Follow the normal on-screen instructions to complete the installation.