Jerry Nixon on Windows: Windows 8: Boot to VHD

Jerry Nixon on Windows

Thursday, June 21, 2012

Windows 8: Boot to VHD

imageBoot to VHD is the easiest and possibly the best way to virtualize Windows 8. The idea is, you install Windows into a file. Not only does it NOT pollute your hard drive, but you also do NOT boot the host!

I have heard as little as a 3% hardware performance loss in Boot to VHD, which makes it FAR superior to booting the host and running it in a virtual window. What’s great is how easy it is.

Note: Running Windows 7? Then, there is nothing to install to get boot to CHD working. It’s part of the OS features.

Create a Bootable USB

You are going to need a bootable USB to make this work. You might be able to use a bootable DVD, but you are on your own – I have not tried that. In a previous article (Windows 8: A bootable USB) I stepped through the process to create a bootable USB drive. Do that first.

Download the Windows 8 Release Preview ISO here.

Create a VHD Disk

From the Run dialog open “diskmgmt.msc”. This will open up the Disk Management console where we can create a VHD. If you don’t have 100GB of free space, then stop and try again when you do.

  1. imageCreate VHD
  2. Location = (somewhere on your local disk!)
  3. Size = 100GB
  4. Type = Fixed

Note: some people use a fixed 60GB VHD for this. That’s fine. You do what you want. I am stepping you through what I do. So, after you have created your new drive/file, it should appear in the drive list. Just right-click your new drive and “Initialize” the disk.

There’s nothing more to do in windows. Get ready to reboot.

Boot to your USB

You might need to update your BIOS to allow your machine to boot to a USB. Here, you are on your own. If you don’t know how to update the BIOS boot order, I don’t want to be the reason you wreck your computer. But if you do, keep going!

After setup starts (Windows 8 setup should start automatically) you will need to drop to DOS in order to mount your drive/file – otherwise you can’t install to it. When you have landed at one of the setup screens just hit SHIFT+F10 to open a DOS prompt.

What’s hard here are the drive letter. You need to find the drive and folder where you placed the VHD. You need to hunt. Try C:, E:, D: – mines was on H:.

Mount the Drive

Once you know where your file is, use Diskpart to mount your drive/file like this:

diskpart
select vdisk file={your file, e.g. h:\vhd\w8rc.vhd}
attach vdisk
exit

After this, you can close the DOS prompt.

Install Windows 8

The Windows 8 Release Preview key is: TK8TP-9JN6P-7X7WW-RFFTV-B7QPF

Continue with a Custom installation of Windows 8 – this will nuke everything on your disk, but since we just created it, there is nothing to lose. In the “Where do you want to install Windows 8” screen be sure and pick the right drive! Identify it by its size if nothing else.

See the warning ”Windows can’t be installed on this drive”? Ignore it. Really, it’s nothing. Just continue with the installation (click Next).

image

Note: Installation time will depend on how fast your hard drive/CPU is. Mine took 15 minutes.

Run Windows 8

Remember to remove the USB from your machine when it reboots (at the end of the install). You should get a nice screen like this (above). Now, you can boot straight to Windows 8. I watched a guy install with a Ubuntu dual-boot and it didn’t wreck it for him, too. So what are you waiting for?

Download Visual Studio 2012 Express here. (for Ultimate, use MSDN)

Best of luck!