Do you use one PC for several purposes, such as gaming, working, and watching movies? If so, you’re wasting performance. Despite the fact that modern PCs are supposed to have been built to support multiple activities, they just do an okay job at handling a variety of tasks. And it’s not just about performance being affected—balloon tips, update reminders, and endless background activity can disrupt your use.
In this guide, I’ll explain how to set up several copies of Windows 7 on one machine using the built-in Virtual Hard Disk (VHD) boot feature, which you can set up to run one specific task. For example, you can have a dedicated, slim version of Windows 7 just for gaming. (Editor’s Note: The content of this article only applies to the Ultimate and Enterprise editions of Windows 7; while the lower editions support the creation of VHDs, they don’t support booting from them.)
I’m not saying that Windows is incapable of being used for a variety of tasks; you’ll just get a far better experience when you isolate them.
A single-purpose Windows
One Windows for all tasks is not the ideal situation if you want to squeeze the maximum performance out of your PC. Here are a couple of scenarios demonstrating a compromised Windows environment:
If you want the highest possible frame rate and absolutely no interruptions, you shouldn’t be playing on a system with 100+ processes and services, mostly from typical business applications.
Decoding a 1080p video clip or playing a Blu-ray requires a lot of CPU or GPU power. If you’re experiencing stuttering or even dropped frames, it is likely due to the fact that your system is struggling with the vast amount of installed applications and games.
Home cinema programs, optimized drivers for gaming, and other leisure services can impact your productivity.
I use one PC for almost all of my tasks, including watching movies, running performance-heavy business applications, testing pre-release software, and even gaming. This is why I asked myself, “Why don’t I just install several versions of Windows on one PC with each configured to serve a single purpose?”
Of course, dual-booting is an easy option. Just install another copy of Windows 7 on drive D:, E:, F:, and so forth. However, you can only install a maximum of three copies of Windows 7 on one hard disk because you’ll run out of primary partitions. There is another way, though, that allows you to install as many Windows 7 systems on one PC as you like. Yes, you read that right!
Booting from VHD
In Windows 7 Enterprise and Ultimate, Microsoft allows the creation of VHDs. These files end with the .vhd extension, and are capable of containing an entire system environment, including boot and operating system files, programs, and data. The VHD format is used in virtual PCs (e.g. Windows XP Mode, Windows Virtual PC, or Hyper-V), and can be applied as a physical boot media for your PC. In essence, you can create as many VHDs as you like, save them wherever you want (e.g. on drive C: or D:) and select them from the boot menu. Here’s how to create a VHD file, make it bootable and install Windows 7 on it.
Insert your Windows 7 DVD into your disc drive and boot from it. Follow the instructions on your screen from Windows. If nothing happens, set up your BIOS to boot from your DVD drive. To do that, either hit F2, DEL, or another key.
Select your keyboard and language preferences, and go to “Repair your computer” instead of continuing with the Windows 7 setup. On the next screen, select your current operating system and hit “Next”. Now, click on “Command prompt”.
You need to start “diskpart” which is a disk configuration and management tool. Simply type it in, and after a few seconds, it will run.
To get an overview of all of the currently active partitions, type in “list volume”. This shows you all of the hard drives and partitions on your system. It is important since you need to know where to save your VHD, and the drive letters in this pre-boot environment don’t necessarily match the ones when Windows is running.
To create the VHD, type in “create vdisk file=C:\MyWindows7.vhd maximum=65536 type=expandable”. In this example, I created a VHD called “MyWindows7″ (the name is entirely up to you) on drive C: which can be expanded to a maximum size of 64 GB (65.536 KB). Keep in mind how much disk space you have left, and don’t give it more than that, otherwise, you’ll end up with the dreaded Blue Screen of Death after setup and have to start over again.
Now that you’ve created the VHD file, let’s make sure that Windows 7 sees it as an actual, physical drive. To do that, type in “select vdisk file=C:\MyWindows7.vhd” (change the path and name accordingly) and hit Enter again. Then, type in “attach vdisk”. Done? Good!
Here comes the important part: Do not restart your machine. Type in “Exit” to leave the “diskpart” tool, and close the command prompt window and then the “System Recovery Options” window.
Click on “Install now” to launch the Windows 7 setup assistant. Go through the usual steps of clicking “I accept the license terms”, “Next”, and “Custom (Advanced)”. Then, go through the list of all of the hard disk partitions on your system. The new VHD should appear as “Disk 1 Unallocated Space”, if you only have one disk built into your system. If you have two physical hard drives, it should show “Disk 2 Unallocated Space”. It should be the exact same size you gave it earlier, as well.
That’s it! Hit “Next” and wait until Windows 7 wraps up its installation procedure. After that, you can use this VHD as you would a normal partition: Configure Windows, install applications and copy your data.
By repeating Steps 1 through 7, you can create several Windows installations. Using the example at the start of this blog post, I created one for business, one for my home entertainment applications including Windows Media Center, and one for gaming which runs some very basic services and no drivers.
Oh, and before I forget: The default boot menu will now show you several entries called “Windows 7″ which might make it a bit difficult to know which Windows 7 version you’re booting into. I suggest using EasyBCD to edit the boot menu entries, so that they read as “Windows 7 – For Gaming” or “Windows 7 – For Work”, for example.