In-Depth

A Virtual Machine Primer

Virtual PC software can ease migration and give any robust machine multiple personalities. Here’s what you need to know to take full advantage.

There used to be six computers in my test lab, representing one, two or more domain controllers, a member server or two and some clients, depending upon what I had going on. A Keyboard/Video/Mouse (KVM) switch enabled me to move between these machines and watch how they all interacted. Cables were everywhere and creating a new setup took forever.

One day two products came into my life and changed everything. Instead of six computers, a mess of cables, and endless lab setup and breakdown time, today there is no clutter and configuration time has been reduced to a matter of minutes.

Magic?

No! Virtual Machines!

The Pre-History of Virtual Machines
Virtual machines are pretty simple. If software can emulate hardware, anything can run on the resulting virtual machine as if it were a real computer. The concept goes back a long time. In the 1981 Tracy Kidder bestseller, "The Soul of a New Machine," Data General engineers wanted to see what the mini-computers they were developing might be capable of, so they built them entirely in software. Kidder called these "simulators," but they were really virtual machines.

In the mid-90s Connectix had a similar idea: if it could build a PC "simulator" entirely in software for the Macintosh, people could use PC software within their Macs. VirtualPC for the Mac was only a marginal success because it tended to run slow. Not only did the software translate the comings-and-goings of the PC software, but it had to translate between disparate processors, since the Mac ran a Motorola 680x0 or PowerPC processor.

In 1998 VMware built VMware Workstation, which ran on a PC. Because it virtualizes sessions on a PC, it didn't have to translate between processor types, and ran exceptionally well.

Enterprises latched on, and used it to roll out modern desktops such as Windows 2000 and Windows XP, while still running crusty old applications on virtual machines supporting operating systems such as DOS and Windows 9X.

Connectix matched VMware with Virtual PC for Windows, which Microsoft snagged in 2003. After a market respite, Microsoft launched Virtual PC 2004 and is wrapping up Virtual Server 2004. Not be outdone, EMC last year bought VMware.

Terminology
As when you travel to a foreign land, you need some specific vocabulary to talk virtual machines. Here's a quick translation guide:

  • Host: This is the "real" PC. Once you load the virtual software on a host computer you can create multiple guests.
  • Guest: This is your "simulated" PC. When you instantiate a new guest, it will turn on like a real computer, beep like a real computer, count RAM like a real computer, and attempt to load an operating system like a real computer.
  • Virtual disk: In order for guests to load and run an operating system, they need to have space somewhere. Typically (though not always) you allocate a "Virtual disk" to the guest, which utilizes real hard drive space on your host computer. If you allocate a 2GB hard drive to guest, expect the guest to consume a maximum of 2GB of real hard drive space on the host.
  • Virtual NIC: Multiple guests running on a host will all appear to have their own unique network cards, each with a unique MAC address. This concept of a Virtual NIC is killer. Using only a single real NIC in the host, each guest can network to each other, the outside world, or both.
  • Other virtual hardware: Guests can leverage different "real" hardware components connected to the host, including sound cards, serial and parallel ports and USB ports. You can even have a special label printer that only applications running on the guest can access, for example.

How Does the Magic Happen?
A PC has many components—and that's where the magic happens. Both the EMC and Microsoft virtual machine software have standard sets of "virtualized" hardware which will always be exactly the same whenever you turn on a guest. For instance, the NIC inside a VMware guest will always appear to be an AMD PCNet card. Likewise, inside a Virtual PC guest, the NIC will will always appear to be an Intel 21140-Based PCI NIC. This is regardless of whether your real NIC is a 3Com, IBM or Brand X from Taiwan. The magic happens when Virtual PC or VMware translates the requests from your real computer (host) to each of your fake computers (guests). The same magic happens for sound cards, keyboards, mice, and a whole lot more … with specific exceptions.

The main exception is RAM. There is no emulation for RAM; in order to have a guest running, you need to allocate enough RAM to support it. It's possible to swap RAM to real disk, but it will be painfully slow, so it's not a great option.

Depending on the virtual machine technology used, the processor may or may not be emulated. VMware "passes though" the processor without emulation, while Virtual PC goes through an emulation layer—regardless of the underlying processor. In either case, if your processor is slow, your guests will likewise be slow. In general, it is slower to emulate, as Virtual PC does.

Both tools also exchange data between the host and the guest. You can drag and drop a file from the host onto a guest, or vice versa.

Virtual machine software can be a terrific tool. Just make sure you have the horsepower to handle it.

About the Author

Jeremy Moskowitz, Group Policy MVP is founder of GPanswers.com and PolicyPak Software. Since becoming one of the world's first MCSEs, he has performed Active Directory, and Group Policy planning and implementations for some of the nation's largest organizations. His latest (upcoming) book is "Group Policy Fundamentals, Security, and Troubleshooting, third edition" which will have new content for Windows 10. Learn more about the book and Jeremy's Group Policy Master Class training www.GPanswers.com. GPanswers.com was ranked as one of "The 20 most useful Microsoft sites for IT professionals" by ComputerWorld magazine. Learn more about how to secure application settings, report on Group Policy Compliance and deploy all Group Policy settings thru the cloud at www.policypak.com.

Featured

Subscribe on YouTube