The current wave of interest in virtualization dates back to the release of VMware’s Workstation in 2001. The product was immediately embraced by developers who saw in it many opportunities, primarily for running Linux or UNIX code on Windows system. Other vendors had previously enabled similar transportability of code, but they relied primarily on emulation, cross-compilation and similar techniques.
The first release (numbered starting at v. 3, curiously) was not a thing of beauty. It had limited capability and ran very slowly. There was no way to confuse the Workstation experience of a virtualized desktop with the real thing.
However, as the years progressed, VMware steadily improved the product—goaded by internal need as well as the arrival of competitors, such as Microsoft’s VirtualPC and Xen, both of which can be obtained at no cost. (Virtual PC was originally developed by Connectix and released in 1997. So, in fact, it predates VMware’s product. However, VirtualPC was then universally seen as a niche product for running Windows apps on the Mac, and was not seen as a virtualization product. Outside of its intended niche, it received little, if any, notice.)
Late last year, VMware released v. 7 of Workstation. This version continues the company’s long commitment to the needs of developers. And while the product is no longer marketed as a programming aid, the features it contains are remarkably useful to us in the hacking business.
The first thing to note is that this release supports all major recent architectural changes. It can handle multiple processors with multiple cores (its graphics capabilities can finally handle the Aero interface in Windows Vista and Windows 7). In addition, it works fine both hosted on and running 64-bit operating systems. And finally, it supports the various forms of USB 2.0 devices. All this means that most of the current hardware technologies can be tested.
The developer-friendly features include the ability to record an activity and rerun it, stepping into and back out of bugs; Workstation also has the ability to interact directly with a VM from within leading IDEs.
The first feature is particularly useful in the test and QA cycles. A tester who can duplicate an unexpected event can run the software in the VM and turn on recording. He or she can then capture the recording in a file and log the bug in the defect tracker with a URL pointing to the saved file. (Because the recording files are very large—they capture the entire VM, and so can reach multiple gigabytes—they are not suitable for uploading into the defect tracking system itself.)
The developer can then replay the saved file and watch the defect surface. Rewinding the recording allows it to be replayed as many times as necessary. Workstation thoughtfully enables flags to be set at any point so that various events can be highlighted in the replay.
The natural extension to the concept of playback is that of saving an entire VM as a static snapshot. This a handy option if you’re about to heavily modify a VM. At any point, you can throw out the modified VM and return to the previous (snapshot) version. For example, if you’re planning to modify a database in a series of tests, snapshots can be a useful way to get your database server back to its original pristine state.
Likewise, if you’re planning to review several tools, do your review in a VM. Let the VM’s registry get corrupted. When you’re done, either save the VM to a DVD or throw it out, and use the original snapshot as the basis for new clean VMs. Snapshots need not occur just once. VMware has a way of scheduling them to be captured at regular intervals so that you can easily return to a previous point in a lengthy process.
The addition of SpringSource tools to the package enables developers to “automatically start Workstation, power on a virtual machine, revert to a specific snapshot, inject the SpringSource server, copy the project to the virtual machine, start the application, and attach a debugger”—all from within Eclipse. Similar capabilities exist for Visual Studio. As VMware points out, this option makes it easy to develop and test Java apps, without needing to populate a physical machine with the test code, nor create a cloud system for testing.
A final bonus is that, for the first time, VMware Workstation can run multiple VMs simultaneously. You can identify a group of VMs that are to boot together and be treated as a group. This is ideal for testing a three-tier architecture and similar enterprise configurations.
The bottom line is that VMware Workstation is uncommonly useful as a testing, QA and reviewing platform. And at US$189 retail per seat, it’s truly a no-brainer.
Andrew Binstock is the principal analyst at Pacific Data Works. Read his blog at binstock.blogspot.com.