IT Certification and Training Blog

MS Windows 7 Tips and Tricks | 2.5 Virtual Hard Disks

Jun 4, 2012 2:21:00 PM / by Kelson Lawrence

2.5.1 A virtual lab (part 1)

By Val Bakh

In IT lingo, virtual means something emulated, not quite real, something that in reality is not quite what it appears to be. For example, a virtual computer, which is usually called a virtual machine (VM), is a software-based imitation of a computer, a logical object that in many practical aspects can be treated as a real, physical computer. A VM can be turned on and off, can be started up and shut down, can be reset and booted. Like a real computer, a VM has devices—virtual, of course— that can be added, configured, or removed. A virtual hard disk (VHD) is one such device; it is a .vhd file that logically emulates a physical disk. In Windows Explorer, a VHD looks just like another file, but from within a VM, a VHD looks like a real hard disk. You can partition it, create volumes on it, format the volumes, install an operating system and other software, and store data.

In Windows 7 and Windows Server 2008 R2, you can attach a VHD to a physical computer and use the VHD as if it were an additional physical hard disk. The Disk Management console and the Diskpart command-line tool have been enhanced to support this functionality. Now you can even install Windows 7 or Windows Server 2008 R2 on a VHD and boot a physical computer from the VHD. Don’t get too excited about it, though; there is approximately a 20-percent performance penalty if you run Windows 7 or Windows Server 2008 R2 on a physical computer off a VHD. But think about all the possibilities that you now have! You can create a VHD, pretend it’s a real disk, and create another VHD inside it. Can you create yet another one inside the second VHD? Theoretically, no, because of the limitations of the NTFS file system. But in reality? Install the Hyper-V server role on a Windows Server 2008 R2 physical computer, create a VM with VHD-based storage, install Windows 7 or Windows Server 2008 R2 on the VM, and now the two-level nesting limit starts afresh. Since the starting point now is a VHD rather than a physical disk, you can achieve three-level nesting. And just for kicks, you can connect to the Hyper-V server over the network from within the VM and attach a VHD that serves as storage for another VM—that is, while that other VM is turned off, of course.

Sounds like a lot of fun, doesn’t it? Like traveling into the future, helping your older self to invent a time machine, and then bringing it back into the past (which, in fact, is the original present) so that your younger (in fact, the original) self can travel into the future, where it all—kind of—started. As you can see, it can get pretty confusing pretty fast. So don’t play with VHDs just for kicks; don’t try to use virtualization as a way of having an IT version of fun. Use them wisely.

Here is one possible way to do just that. Every IT pro needs a playground (some also call it a sandbox)—a computer lab where he or she can test, without hurting anyone in the process, how things really work and can design solutions that will make the lives of mortal humans more productive. Depending on what you usually work with and on your budget, the lab could grow to a dozen computers or maybe even more. Shelves, racks, desks, cables, monitors, keyboards, mice—you name it. Not to mention constant relabeling, just to make sure that by lunchtime you don’t forget the computer names you assigned in the morning. Quite often, such an environment, which is supposed to be an IT pro’s dream, easily gets out of control and turns into a nightmare instead. And how much time is wasted on constant reinstallations, when you need to start all over because you have made a mistake or need to return to square one to try a different plan?

Now compare this “real” lab to a virtual one. It’s all on one computer, which may be powerful and rather expensive, but it’s only one computer instead of a sprawling, out-of-control lab of “real” computers. How can this be possible? The answer is, through replacing each physical computer with a virtual one.

Next time, we’ll take a look at how it works.

Are you interested in Microsoft Certification? Take a look at our Microsoft Practice Exams and try a free demo.


Practice Exam Demos

Topics: Windows 7, tips and tricks, virtual hard disks

Kelson Lawrence

Written by Kelson Lawrence

Subscribe to Email Updates

Lists by Topic

see all

Posts by Topic

see all

Recent Posts