Howto: Installing Windows 8 to a Virtual Hard Disk
As you may or may not know, the Windows Developer Preview is available for download directly from Microsoft. This allows potential developers for the new operating system to familiarise themselves with the system and get a feel for the new Metro UI look-and-feel that Microsoft is pushing for their software ecosystem. You also get to play with the new developer tools like Visual Studio 11 Express.
The problem with a new version of Windows is that you need to format an extra partition on your hard drive and that usually involves clearing up some space, moving around some programs and finally risking data loss when you try and resize a partition to use for your dual-boot system.
So I went looking for a different answer and found one on this blog. Microsoft Windows apparently has the ability (since Windows 7) to boot the operating system from a Virtual Hard Disk (VHD), which is a hard disk stored in a single file.
I will quickly step you through creating your own VHD and installing Windows 8 on it.
- Boot up from the DVD or flash drive that contains Windows Developer Preview. You can read more about putting the ISO on a flash drive here.

- When you get to the installation screen, don't click next yet. Press Shift-F10 to open up a command prompt

- Create a virtual disk, using the 'diskpart' utility
- First use 'list disk' to give you a listing of all your drives
- Select the disk with the appropriate number. In my case I only have one disk, so 'select disk 0'
- Now list all the volumes on the disk so that you can determine the drive letter where you need to create the VHD, using 'list vol'
- In my case, Windows 7 is on the 'C' drive. Now create the VHD with the following command, using your drive letter:
'create vdisk file=c:\win8.vhd maximum=20000 type=expandable'
'maximum=20000' creates a VHD that's 20GB large. Adjust to a size that you want
'type=expandable' tells diskpart to create a VHD that will not take up all the maximum space up initially, but will instead grow to eventually fill up the maximum space. You can change this to 'type=fixed' if you want the drive to take up all available space from the beginning. - Now that your VHD has been created, you need to select and attach the disk so that the Windows installer can see them
'select vdisk file=c:\win8.vhd'
'attach vdisk' - Now that everything is done, you can exit both the 'diskpart' utility and the command prompt. See the image below for all the commands I've used
- Now you can select your language and click 'Next'

- Click 'Install Now'

- Read through and accept the license terms

- You could select 'Upgrade' here but that will upgrade your existing Windows, which you don't really want. Select 'Custom' so that you can create a new installation on the VHD that you've created

- Here's the special part. Select the VHD file you created to install Windows on. Don't select the wrong disk! Also, there is a warning on the bottom, but you can safely ignore it.

- And now the waiting begins

- Once the installation is finished and you've gone through a reboot or two, you will be greeted with the first Metro-style screen. Accepting a new set of license terms. (notice the sense of humour that Microsoft developed at the top of the screen)

- Now you can personalise things like your computer name, whether you want a Windows Live ID, etc. An example screen below

- Once you've done everything, you're greeted with a final screen

- Finally, you're greeted with the new interface. Pretty...

There are some cons to installing Windows 8 to a VHD:
- You can't use BitLocker on the Windows 7 machine at all
- You can't run the Windows Experience Index
- Obviously, your VHD maximum size cannot be larger than the host drive that you are storing your VHD on
So there you have it. Installing Windows 8 to a VHD file will not mess up your current configuration and you can play to your heart's content. At a later stage, I will share my first impressions with you, once I've played around a bit more.
I'll leave you with these two images of Windows 8: The new dual boot OS selection screen (no more ugly DOS text!) and the logon screen... both are pretty!









2 comments
Arigatō Tiny-san!
Baie dankie man!
Dis baie helpful! :-)
Hi
Nice blog your way of describing is very easy i get this and keep enjoying.
Thanks
Post new comment