The computer press is full of interest in "virtualization" these days. Before getting into the implications of virtualization for Web services, a little computing history is in order. In many ways, the history of the computer industry is also the history of virtualization.
As used in computing, virtualization refers to the creation of an abstract generalization of a computing resource to make the use of that resource independent of the actual underlying hardware. The very first example being languages like COBOL to substitute human readable source code for the details of CPU registers and machine operations.
Compiling source code to fit an abstract virtual machine instead of a specific CPU and operating system configuration came along next. The idea being that compiled programs would be portable and operating system specific interpreters could translate to the actual system. A famous early example was UCSD Pascal p-code most prominently used on Apple II systems. These days, Java byte-code interpreted by the Java Virtual Machine is ubiquitous.
Many features of modern operating systems exist to provide a virtual environment to executing programs, for example address translation that lets a program pretend to be addressing specific memory locations while the operating system handles the physical memory. The next logical step is virtualizing the entire operating system.
Operating system virtualization loads a "guest"
The guest operating system sees a file system which the virtualization software emulates from dedicated chunks of the real underlying host operating system file system. Multiple virtual machines can operate in complete isolation from each other on the same hardware. Individual virtual machines can be stopped and started without disturbing others on the same computer. Naturally the extra layer of virtualization software exacts a price in terms of CPU cycles, disk space and memory.
Guest operating systems can be quite different from those on the host hardware. For example, I used VMware server to install a Solaris 10 virtual machine on hardware running Windows XP. I was pleasantly surprised to see that VMware could also support older operating systems back to Windows 95 and DOS 6 (if I could find the OS installation disks I could play some of these old games that wont run on XP - cool!).
Note that your operating system license may not permit installation as a virtual machine or may restrict the number you can create. For example, Microsoft's license for the Vista Home Basic and Vista Home Premium prohibits use as a virtual machine.
VMware was the pioneer in virtualization software, but the field is getting crowded and competition among virtualization vendors is extremely intense. In many cases, free starter versions are available, with companies hoping to make a profit by selling virtual machine administration software. Open source development of virtualization for Linux is very active, particularly with the Xen project. Microsoft has responded to the competition from VMware and open source projects with free virtualization software.
Web services admins and virtualization
System administrators are enthusiastic about virtualization for a number of reasons. In researching this article I saw many enthusiastic reports. Administrators are replacing collections of underutilized servers of various ages required to support older applications with just a few more modern servers. An administrator can support the new Web services and the legacy services and do it with fewer machines. The result is a great saving in server rack space, maintenance and power consumption.
Once configured, virtual machines can be copied to different physical hardware. This is very valuable when maintaining a system where downtime is extremely expensive since a fully configured service quickly can be powered up. A sudden increase in demand can be met by starting new instances of a virtual machine.
Web services developers and virtualization
Developing in a virtual machine environment has a lot of attractions. A virtual machine with a running application can be suspended or "snapshot"ed and restarted in exactly the same state. Being able to restart a system in a known state vastly simplifies debugging - particularly for problems that only manifest themselves after the application has been running for a long time.
Virtual machines also give a developer the ability to use particular toolkits without regard to the standard corporate operating system. In particular, the many open source applications that run on Linux can now be accessible on your Windows workstation. Virtual machines facilitate testing on multiple operating systems without having to maintain separate hardware for each.
Virtual machines also protect the developer from malware since a program in the virtual machine can't alter the host operating system. You can configure a virtual machine so that it can't even see the local network.
The main precaution for developers in designing applications to be run in virtual machines is to avoid configurations that depend on specific operating system features such as the Windows registry or requiring installation on the main drive.
All major software vendors are jumping into virtualization at a rapid rate. Hardware support in CPU and auxiliary integrated circuits will improve performance and make virtualization a part of every day Web services development.
VMware, the pioneer in virtualization
A starting point for investigating Xen on Linux
A discussion of Microsoft's Virtual Server for Windows
This was first published in June 2007