Thursday, August 28, 2008

Virtual Machine - a software engineer's best friend

Here is another reason why Virtual Machine(s) are a developer's best friend. If you are a packaged software developer (doesn't matter if its desktop or server software), you will probably realize that platform compatibility testing is a large part of the release cycle; not only is the actual testing tedious and time consuming, setting up and maintaining the many testing environments is a whole lot worse. In addition, it can get pretty expensive too as you will need multiple machines to contain them.

Back in the days when I was developing packaged software, one of my strategies for managing test environments on the cheap is to use boot loaders (such as LILO and GRUB) and hard disk partitions. Using this approach, I had up to four environments running on a single PC (only four environments due to a limitation on the number of primary partitions a hard disk can have). Not long after, I figured that I could further cut down on the number of boxes required by using removable caddies to facilitate the swapping of hard disks on a single PC.

This strategy was indeed cost effective (I managed to reduce my farm of test PCs from eight to just two) but it was darn tedious and not as robust as I had wanted; I could only have one environment up at a time on one PC and it was time consuming to shutdown and startup another. In addition, the OS images are practically tied to the specific hardware it was installed on as we all know how crappy Windows is when it comes to swapping hardware.

Then enters VMware and its (then) flagship product VMware Workstation. My test environments became normal files and were able to run off any host OSes as long as the hypervisor supports it. With it, I was no longer bounded by the four primary partition limit on a hard disk, could run multiple environments all at the same time and copy/move them between PCs seamlessly (even if they are running different host OSes!). In addition, with the snapshot feature, I could create a base image of each test environment and easily revert to it after testing.

Out went the drive caddies, the stack of hard disks and backup tapes piled up on my desk, LILO, PartitionMagic and Norton Ghost! In addition to cost savings, the time saved was also considerable and it was appropriately channeled to our LAN parties in the office! :)

No comments: