Dual Boot Windows 8 from VHD using Windows Setup

http://blog.concurrency.com/infrastructure/dual-boot-windows-8-from-vhd-using-windows-setup/

 

Post Pic

Dual Boot Windows 8 from VHD using Windows Setup

Posted on September 15, 2011 by Shannon Fritz in Infrastructure

Are you running Windows 7 and have things just the way you like them, but you’re really curious to see how Windows 8 looks and feels? Using this method, you can boot your computer between your existing Windows 7 installation or Windows 8 without needing to sacrifice disk space! Using a Dynamic Virtual Hard Disk (VHD), you can install Windows 8 to a single file that is stored on your Windows 7 file system, and then boot directly from that Virtual Hard Disk when you can then choose to load your existing OS or the new Windows 8. You are not doing an in-place upgrade and you are not doing a rebuild. It’s just a new install of Windows 8 and you don’t have to trash your existing setup to do it. Let’s get started!

On the computer which already has windows 7 installed, boot from the Windows 8 media and you’ll launch the installer. Before clicking “Install Now”, hit Shift+F10 and the WinPE command prompt will appear.

Note: If you want to boot from USB instead of burning a DVD, you can use the very handy WUDT tool from CodePlex which will make a bootable USB stick from the ISO for you.

It’s time to create the VHD that will be your Windows 8 drive. Run “diskpart” from the CMD window, then issue the following commands to diskpart:

  1. list disk … This shows your currently attached hard disks. In this example I only have one, Disk 0.
  2. select disk 0 … You want to select the disk where you’re current operating system (Windows 7) is installed, so if you have multiple disks available, you might use a different number.
  3. list vol … Show all the volumes that exist on that disk. Existing installations of Windows 7 will usually have a 100MB volume that is the “System Reserved” partition (used as the boot loader and leveraged by BitLocker) and then the actual OS volume is much larger. In example you can see my Windows 7 volume is actually assigned to letter D (although when booting normally it would be my C: drive).
  4. create vdisk file=d:\Windows8.vhd maximum=100000 type=expandable … This creates a Dynamic VHD that can grow to ~100GB in the root of my Windows 7 partition.
  5. select vdisk file=d:\Windows8.vhd … after selecting this vdisk, the following commands will apply to it
  6. attach vdisk … The VHD will be mounted and the disk will be available to the windows installer
  7. exit … we’re done with diskpart

All those commands will look like this:

Now you can close the Command Prompt and return to the Install Windows wizard and click Install Now. When asked where you want to install Windows, you should see a new Disk 1 listed with Unallocated Space. You’ll notice that when you select this disk the installer will tell you that “Windows cannot be installed to this disk” but the Next button is enabled. If you click Next, it will in fact install Windows there just fine.

Once the installation is complete and your computer reboots, you will see a new boot loader that asks you to “Choose an operating system” and you can select either the new install of Windows 8 or your previously existing OS. The first time this appears you get about 3 seconds and it auto loads Windows 8 to finish the setup. On subsequent reboots it’ll give you 30 seconds before auto selecting it.

Now you can browse around Windows 8 on your Native hardware! You can also still access files on your Windows 7 disk. Open Explorer and you’ll see it appear as a different drive letter (D:\ in this case) and you can browse around and copy/modify files as you wish.

Notice that the D:\ looks full? This is because the VHD you created for Windows 8 is reporting its maximum size instead of its actual size. When you boot into windows 7 you’ll see the VHD is actually only about 8GB.

All done with Windows 8 and can’t figure out how to shut down? Take your mouse and hover over the start button, or touch your mouse cursor to the bottom left corner of the screen and a small start menu will appear. Click on Settings, then Power and choose Shutdown.

Now you can enjoy the best of both worlds…N’joy!

Back to Top