Virtual Machines Run a Real PC Inside a Window


Test and deploy applications on any OS in seconds without leaving your Windows. Let's discover how those applications can help you.

Virtual Machines (VM) allow you to run any operating system in a new window. This is done by using virtualization, which is the general technology used by virtual machines. Imagine what you could do if you had under your control many computers, possibly connected together. Best is, they are simple to use and have only little performance hit. Well see what those applications can do, how they can help you (test any OS or application while keeping you PC clean), and how to use them. Further, VM make it possible to create testing plateforms for your applications, websites, or virtually anything!

Why Use Them?

Until recently testing softwares was difficult. You had to create different partition and restart the PC. Then after you did you changes, in order to keep the PC state clean you and clean up you needed something like a ghost. I remember installing a whole Linux with all the applications I needed and drivers for everything, just to be able to have a clean internet access while doing my testing. Now I open my virtual machine on Windows (they can also work on any other OS) and start one or more virtual machines, like I would start a normal application.

Things you can do with virtual machines include:

  • Test an application or try a full operating system (without risk or affecting your real OS, before deploying it),
  • Running multiples OS simultaneously,
  • Simulate client machines or web servers,
  • Deploy any complex application without install,
  • Create security bridges (Jeanus, VPS...),
  • Backward compatibility.

How They Work

Their working principle remains relatively simple. A virtual machine is like a PC, PowerPC or any other machine but that only exists in the virtual world. It's as if you were Neo, and the virtual machine was the Matrix. In this analogy, the real world is called the host machine, as opposed to the virtual machine (also called guest machine) you're running on it. Everything runs in a simulated computer. Now almost all virtual machines allow you to use the same mouse, keyboard and share your network connexion, share files, your CD drive and possibly other devices you choose. Your virtual PCs becomes as simple as new applications you can control. Applications can then be installed and run on a virtual machine as if they were running on a physical PC.

Screen-shot of Virtual PC running Windows Vista guest on Windows XP host
Virtual PC running Windows Vista in a guest machine, on Windows XP host machine.

Using Them

Let's see a more concrete example of usage on Windows. There are two main virtual machine applications: Microsoft Virtual PC which is free (similar to Microsoft Virtual Server). Virtual PC 2007 is very simple to use and works well for any Windows OS. It's features however become quickly limited and not every Linux distribution is working correctly on it. The second, and my favourite VM, is VMware that comes free in the form of VMware Player but only the VMware Workstation will allow you to create virtual machines. You can create with VMware Workstation many snap-shots of the system (Virtual PC only supports a single snap-shot called Undo Disk), manage your disks, install all kind of Linux distributions, and much more.

Let's start with Virtual PC 2007. First it's free, and second it's a simple choice to start with. You must first download it from Microsoft (it's free and less than 40MB large). Once installed, open it. Press the "New..." button. Then you basically follow the steps. To install a Windows 98 you will select "Windows 98" in the drop list. Once you've finished, insert your Windows 98 installation disk in your CD drive, and start your virtual machine by pressing the "Start" button. After some time you'll see the traditional installation menu that will start the installation process of Windows 98. Don't forget to install the Virtual PC's addons later (use the system menu of Virtual PC for that). They will allow you to run faster, share files, and simplify the user input. You can now add whatever you like. If you stop the virtual machine, you can also ask to create an Undo Disk. This disk allows you to un-make any change done afterward, so you can keep a freshly installed virus-free PC all the time. Still I wouldn't advice going on-line without any firewall or Windows Updates.

Other Virtual Machines and Emulators

Virtual machines can also emulate PowerPC to run Mac OS X. The only thing you need is to buy the Mac OS X disk. PearPC is free and it can run Mac OS X, but its features are still far from Virtual PC or WMware (which do not support PowerPC). Technically speaking it's an emulator, meaning it's emulating the processor and the whole architecture. There are emulators for almost everything: Cells phones OS, Palm OS, Pocket PC, old computers, old and recent game consoles.

Going Further

I use them to test my applications, to compile Linux softwares and test them, to create a web server I can move around, to see my website using the older Internet Exploer, run risky applications and services in a virtual environment... Now make use of your imagination and find some new way to make use of this technology. Don't forget to let me know about your ideas. ;)

Screen-shot of VMware Workstation running Linux guest on Windows Vista host Screen-shot of VMware Workstation running Linux guest on Windows Vista host
VMware Workstation running Linux on Windows.

Links

— Werner BEROUX, Updated on June 21, 2007