January 10, 2007

Desktop Virtualization with VMware Player and Workstation

Author: Mayank Sharma

More and more organizations are consolidating physical hardware using virtualization. But virtualization technology and tools aren't limited to big-dollar corporations. With the free-as-in-beer VMware Player, and the very cheap VMware Workstation, you too can use this fancy technology to utilize the processing horsepower of cheap multi-core hardware available off-the-shelf.

Playing with distributions

VMware Player is available as a free download for both Windows and Linux, and Ubuntu users on x86 and AMD64 machines can even install VMware Player from the Ubuntu repositories.

VMware Player can't make VMs on its own, but you can find virtual appliances on VMware's Virtual Appliance Marketplace. Once you have the player up and running, download an image from the marketplace and point it an image of a pre-configured virtual machine.

If you are new to Linux, or haven't tried it at all, get an appliance for a Linux distribution and off you go. It not only saves on installation time, but also enables you to run a complete operating system inside a little window. How cool is that?

New options in VMware Workstation 6 beta - click to view

And don't assume the appliances are only for fun. Many are tuned and purpose built for specific tasks. The LAMP appliance, for instance, gives you a pre-configured Linux, Apache, MySQL, PostgreSQL, PHP, Python, and Perl setup, along with several Web-based configuration tools, all in one neat ready-to-use appliance. No cumbersome setup or configuration required, just download, uncompress and run it in VMware Player. Your very own Web-server, fully configurable through a Web-browser, up and running on your intranet in no time.

But VMware Player can only run pre-built virtual machines. It cannot create its own. Or can it? This article on NewsForge details the procedure of tweaking a pre-built image to own your requirements. Apart from that several freeware tools and Web sites, like EasyVMX and rPath, can create custom virtual machines and custom appliances for you.

Create your own virtual infrastructure

If you don't feel like going the hard way to image creation with VMware Player, VMware Workstation makes managing and creating virtual machines child's play. It's available for both Linux and Windows as a 30-day free trial, after which you need to shell out (USD) $189. Installation on either platform is just a matter of clicks and is well-documented.

You get a plethora of options to custom-cook your virtual machine. This is made easy by the New Virtual Machine Wizard. While putting together your virtual machine, you also get the option to use your network card with the same IP address as the host machine through NAT.

Since most distributions are available as ISO images, VMware Workstation can fool your virtual machines into reading these as CD-ROM disks. This saves the time and effort required to transfer the images on to physical media. So you can download, install and run, a 64-bit edition of FreeBSD available as a DVD image on a 10 GB IDE disk inside a virtual machine residing on your Pentium 4 host (with IVT support) with a SATA hard disk and no functional optical drives running Windows. You can easily change the configuration of the virtual machines by adding or removing the virtual hardware at any time, when the virtual machine isn't running.

VMware Workstation keeps all virtual machines in neatly-organized folders, which can be backed up on DVDs or moved to another host machine running on a different operating system.

VM hardware dialog in VM Workstation 6 beta - click to view

But there's more to VMware Workstation than creating fancy hardware. One feature I love is its ability to pause running virtual machines. Pressing the "pause" button will suspend the running machine in its current state, which can later be resumed. If you'd rather save the state of the running virtual machine repeatedly, use the snapshot feature. A snapshot saves the content of all the disks and memory of the virtual machine and its settings.

VMware workstation's ability to group together several virtual machines into "teams" to setup a virtual lab is also impressive. You can use this setup to test and demonstrate various network software before deploying them on the actual network.

For security purposes, the team members can be made to communicate in a private network completely independent of the host computer's network. The "New Team Wizard" guides you through the process of creating the environment under which the team operates.

Beta be good

During the edit cycle of this article, VMware released a beta version of the VMware Workstation 6.0. VMware Workstation 6.0 beta packs a lot of improvements over the 5.5.3 version I tinkered with above. It supports several new operating systems including 32-bit and 64-bit versions of Windows Vista, Ubuntu 6.10, Mandriva 2007, and several others as both hosts and guests.

On the hardware department, Workstation 6.0 breaks the 4GB total RAM barrier for all VMs combined. The amount of virtual RAM available to all VMs is limited only by the amount of physical RAM on the host. Individual VMs can now grab up to 8GB of virtual RAM.

Virtual Machine hardware converter - click to view

If you like to run individual VMs over multiple monitors or span a guest across several monitors, you can do so with this version. Best of all, this can be done even on hosts that have a single monitor. This is useful if you later plan on migrating this VM to a different host with several monitors. You can also specify what screen resolution to use and how much video memory to allocate per monitor.

Also, if you have USB 2.0 hardware, you'll be able to transfer data at the faster 2.0 supported rates. If you run VMware on a laptop, your guest OS will now be aware of the host machine's battery status.

Best of all, you get a wizard to easily upgrade your existing VMs to the new hardware specs of 6.0. The "Convert Hardware Wizard" will assist in upgrading or downgrading VM hardware between Workstation version 4, 5, and 6. If you decide to downgrade, the wizard also displays a list of Workstation 6.0 features that are not available for that version.

Another nifty new feature is the VMs ability to act as a VNC server. All it requires is a click to allow running the VM in the background, and a port number to allow VNC connections from. When you try to exit Workstation with a running VM, it prompts you to let it run the VM in the background. Then the VM can be reached over VNC, using one of the many freely available VNC clients -- at least in theory. All of my attempts to connect via VNC failed, but this is only a beta version.

The release also boasts enhanced file sharing functionality. It's easier to drag-and-drop files and copy-and-paste text between Windows, Linux, and Solaris hosts and guests. The beta also has some Windows-only features, like mapping a virtual disk to a drive letter in the Windows host, which can now be done with only a couple of mouse clicks. Workstation 6.0 also packs an "Importer Wizard" that can convert a physical Windows machine into a virtual machine. It can also convert virtual machines or system images from Microsoft's Virtual PC and Server, Symantec Backup Exec System Recovery, and Norton Ghost images into VMware VMs.

Programmers who want to use VMware to test programs will appreciate the new Workstation IDE plug-ins. These provide a configurable interface between the VMs and programming environments like Eclipse and Visual Studio, to set up the various parameters for executing programs in virtual machines -- directly from the IDE. The release also features the upgraded VIX 2.0 API that allows you to write scripts to automate virtual machine operations.

If you're planning to use VMware Workstation, I'd advise you to download the freely available 6.0-beta. The detailed Workstation 6.0-beta User Guide, will help you find your way around common tasks and new features. Since this is a beta release, VMware has enabled the DEBUG option for additional logging and error checking, which hampers performance. On my dual-core system with 2GB RAM the difference in performance, between versions 5.5.3 and 6.0 beta, was negligible.

Conclusion

Both VMware packages are easy to install on Windows or Linux. They can save you time dual-booting between operating systems, and help utilize the full potential of your desktop. VMware software has a similar interface on all of the host OSes, which simplifies managing virtual machines. VMware Workstation is also loaded with wizards to guide you to your objective.

Both VMware products are amazing pieces of software. If you can make do with the downloadable appliances, or are not afraid to fire up your text editor to customize your virtual machine's configuration, the free-as-in-beer VMware Player should serve you well. Despite the name, VMware Server is also an option. But if you'd rather have the ability to customize and manage several machines, to test and demo network software or run secure machines, evaluate the not-so-expensive VMware Workstation.

On an adequately equipped host (mine is a 1.86 GHz dual-core processor with 2 GB of RAM), you will be surprised at the speed of the guest OS running on virtualized hardware. With so many VM appliances available for download, I'd recommend you start your virtualization experiment with VMware Player.

Click Here!