For the past two years I’ve been using Virtual PC from Connectix to run multiple operating systems on a single machine. Virtual PC is a software emulator of a specific x86 motherboard, DEC or Intel NIC, and video card. Virtual PC will allow you to have various “guest” operating systems ranging from DOS to Windows Advanced Server or Linux running on a Windows 2000 or XP host box.

In my consulting business, I use a Compaq M700 PIII 800 laptop with excellent results. While functionally similar to VMware Workstation, Virtual PC works differently. Virtual PC is a Windows application that emulates an x86 PC while running as a Windows application. In my personal experience, I have found Virtual PC to be cheaper to purchase and fairly stable, but not quite as fast as VMware Workstation.

In this article, I will explain how you can put together the ultimate portable test machine and help reduce those pesky hardware costs. Not to mention, making use some of those old machines you keep around “just in case.”

Emulation offers nearly endless possibilities
As an example, I have a RedHat configuration with all my network security tools on it. I have an image with Windows Terminal server with Metaframe installed to prototype a way of pushing an old COBAL application out to remote sites with a thin client. This particular example of using Virtual PC to build up the terminal server and then import the application took less than three hours to have up and running. As a test for a client who needed to migrate an Exchange server, I installed Windows 2000 advanced server as a Virtual PC or “guest” and then restored Exchange 5.5 to it as a test before I did the restore on the clients live network. For fun one day after reading about Intrusion Detection Systems or IDS systems, I decided to push Virtual PC’s design and installed PureSecure IDS using MySQL, Apache, and SNORT with PureSecure’s graphical front-end on a RedHat 7.1 guest image. It worked well and I was able to run a quick demo for a client a few days later showing what IDS is and how it could provide significant value to the clients network security. With this experiment I did find that Virtual PC would not support multiple NIC cards.

Virtual pause button

One of Virtual PC’s most useful and interesting features is its ability to take a “snapshot” of a running image and save it until you restart it later. This is very useful when you need to take a break from what you’re doing, but don’t want to lose the place were you are working. I’ve found this feature to work better with my RedHat images, as Windows seems to get confused if it’s been a few days between when the snapshot was taken and when it’s restarted.

My partner is a Microsoft Office trainer for the legal field and she maintains several images of customized Office installations to train with and test. For her, changing the OS is as simple as copying the Virtual PC image off a CD-R and onto her laptop. With the Virtual PC image as a simple file, you can move it around, ZIP it down for burning to a CD-R to build a portable library, and easily restore a troublesome virtual PC by replacing the file.

Virtual PC also works well with products like Norton Ghost for restoring an image for testing or for a quick recovery of configuration information or data. You can boot the Virtual PC session off a Ghost multicast disk and build a Virtual PC image via Ghost across the network. I did exactly this process in order to back up a custom laptop that was being redeployed, although the client required keeping user access to certain applications and files. One Ghost boot disk, one Ghost multicast server, and one Virtual PC blank guest image, and the client had both his redeployable laptop and a running version of the old laptop configuration.

Installing Virtual PC and setting up an image
Virtual PC’s installation process will be familiar to you if you have experience with other Windows applications. It requires a serial number and Virtual PC checks to see if the serial number is used anywhere else on the network. (You can also run a completely functional Virtual PC demo that is free for 45 days.)

Once the application is installed, you need to create the Virtual PC image. The easiest way to do this is to use the application’s image wizard. The wizard will walk you through setting the memory, disk settings, and the type of guest OS that will be used on the image.

Once the wizard has completed setting up the image parameters, you need to start the session. If you are building the image from scratch, this is where you insert the floppy or CD into the CD drive and boot from it. Then step through the install as you normally would on a real PC. There are some notes for various guest operating systems in the Virtual PC readme files, so take the time to at least give them a quick glance.

Using Virtual PC
When you run Virtual PC, you are presented the screen shown in Figure A. From this window you can select and start an image (also called a guest operating system), configure an image’s settings, or create a new image.

Figure A
Virtual PC makes it easy to choose the image you want to use, to configure an image’s settings, or create a new image.

As Figure A shows, this PC has two guest operating systems installed–one Linux and one Windows NT4. To configure parameters for a guest operating system, select the desired OS and click the Settings button. The PC Settings window, shown in Figure B, will appear, which allows you to quickly configure a variety of options such as how much memory to set aside for the OS, whether or not to use shared folders, and what network settings to use.

Figure B
Virtual PC allows you to configure a variety of settings for each image.

To create a new guest OS installation, click the New PC button from Virtual PC’s main window. This will initiate the New Image Wizard and present you with the window shown in Figure C. From here you can choose the Guide Me option, which walks you through the creation process; Create A Default PC; or Duplicate An Existing PC, to copy an existing image.

Figure C
Virtual PC’s New Image Wizard makes creating new images a snap.

Most times I use the Guide Me option since I adjust the memory settings for each guest OS. Once you’ve selected the appropriate option and clicked Next, you must choose which OS you will be installing, as shown in Figure D. Select the appropriate OS and click Next.

Figure D
Virtual PC allows you to run a wide variety of operating systems.

You will now be prompted to configure the guest operating system’s memory and network settings. If you are using Windows 2000 or XP as the host OS, you can configure the guest to pick up a DHCP address from your network or give it a static IP address just as if it were another node on the network. Your other option is to use a shared-networking configuration in which Virtual PC provides a NAT-ed DHCP server and assigns the IP to the guest. The guest and the host then share the host system’s IP address. While this works, it prevents some applications from running properly on the guest OS, such as NMAP. Shared-networking is the only option if you use Windows 98 or Me for the host OS.

Once you complete the Wizard, the new guest OS will be listed on Virtual PC’s main screen. Just click the Start PC button and Virtual PC will open up what appears to be a DOS box, but you will see a screen that resembles a PC booting up. The guest OS will load just as if it were an actual PC OS as shown in Figure E.

Figure E
Virtual PC loading Linux as a guest operating system

When the operating system finishes loading, you have the same startup screen that would appear if you were using an actual installation (see Figure F). By default, the virtual PC runs as a window on the desktop although there is an option to run it as a full-screen application.

Figure F
RedHat 7.1 running on Virtual PC

Interacting with the guest operating system

Switching from the host OS to the guest is as simple as clicking the mouse within the active Virtual PC window. If you are using Windows as the host OS, and neither Linux nor Windows Terminal Server as the guest, you can even install extra utilities that improve interactivity by making the mouse active once the cursor is moved within the Virtual PC window—and more. When you want to move back to the host OS, a quick press of the right [ALT] key does the trick.

Once the Guest OS is loaded, you are free to log in if needed and run just about any application that normally would run on the guest install on a real PC. The exception to this is games. The video emulation is not designed for games and ultra-fast refresh rates. There have been various successes and failures at trying to run games on Virtual PC, but it was never intended for that role.

I have run Exchange 5.5 as a live e-mail server in a Virtual PC session of Windows 2000 Advanced Server using Windows 2000 as the host without a problem. I have also run Terminal Server 4.0 when testing a prototype design to push out old applications, a Windows NT 4.0 Virtual PC running Cisco ACS for training, and RedHat for network forensics and troubleshooting (Figure G).

Figure G
Virtual PC running RedHat and NMAP

With the ability to create and then store images on a CD, you can build a nice library of OS clean installs to use as test beds at the client site without being required to spend the time building a test server. When you are finished with the image, either zip it up or just delete it.

When you are finished using the Virtual PC image, there are a couple of ways (Figure H) to shut it down.

Figure H
Shutting down a Virtual PC session is a simple process.

One method is to shut down the OS just as you normally would. If it’s Windows, you use the normal shutdown command. If DOS, you can use the shutdown menu item on the Virtual PC application screen. It is just like hitting the power off switch. But, there is a third way, as shown in Figure I. Virtual PC offers a way to shutdown the guest OS in a saved state. Use this option to reduce wait time needed when the OS boots.

Figure I
Use the Virtual PC Manager saved state process to reduce boot time.