Thursday, May 27, 2010

Experimenting with VMWare

I've been a Microsoft Virtual PC user for more than 4 years now. I mainly use it to run Windows 2003 Server on my XP which is required by the Microsoft Windows Media Digital Rights Management SDK. We used WMDRM for our online music service, Fliptunes. Since the Virtual PC software came with my MSDN subscription, it was an easy choice.

I've been hearing for a long time that VMWare does a better job of virtualizing PC's than VPC. It was bought out a couple of years ago by storage giant, EMC. Its a very logical move as storage and server virtualization go hand-in-hand. The first time I've used VMWare was during my CEH training. We used VMWare virtualized PC's to test different hacking tools.

Since I'm currently looking at a project which requires running several servers for scaling, I've been thinking of implementing it as multiple virtual PC's on a single powerful box. I decided to give VMWare a try. The fact that they made several versions of their flagship product FREE did not make the decision that much harder.

VMWare provides the VMWare Player, VMWare Server and the VMWare ESXi available for free download. Each one is a great product by itself. It seems that VMWare is focused more on selling the management tools to manage the virtual PC's so they don't mind giving away the basic virtualization software for free.

VMWare ESXi is the top-of-the-line among the three. It allows you to run virtual machines on a bare-metal PC. The ESXi provides the hypervisor functionality without the need for a host operating system to be running. So it supposedly provides the best performance and stability. Unlike other versions that require a host OS, it will not crash the virtual PC's even if the host OS go haywire. I will most likely use this version in my final implementation. But since I don't have a spare high-powered PC right now, I'll test with the others first.

VMWare Player and Server seem very similar at first glance. I tried to google for answers on what makes the two different. Various posts keep mentioning that Player is limited to loading pre-setup virtual machines (VM's), whereas Server lets you create actual VM's. This was true several years ago but VMWare has already lifted this limitation in 2009. VMWare Player can already be used to create VM's from scratch. So what is the difference between Player vs. Server?

The best explanation I've seen is that Player runs as a user mode application. This means that you have to login as a normal user in XP first; run Player; start the VM. With VMWare Server, you can automatically run the VM's as a Windows service making it ideal for a more unattended setup that does not require user login. According to docs, Player and Server cannot be installed on the same machine. So I'm just experimenting mainly with Player.

I created a VM using Player and an ISO image of the Windows 2000 Server installer from my MSDN disc. The installation went unattended and was faster than installing Windows 2000 Server on a real, physical PC. A lot of the prompts were skipped by the installer somehow (or auto-answered by VMWare). The best part is, unlike Virtual PC, VMWare does not pre-allocate the disk space for the VM. Instead, it grows it dynamically as needed.

VMWare suggested that the minimum recommended setup Windows 2000 Server is 8GB HDD and 384MB RAM. I followed the suggestion, but the actual VM files that it created was only about 2GB (not 8GB). So it will just grow it as my storage in the VM grows. The VM can be configured to have a live static IP address and it can be bound to the physical NIC so that the NIC can respond to different IP addresses. Or it can be configured for DHCP and the host PC will just do NAT for it.

Another really neat feature of VMWare is its library of pre-configured/pre-built virtual appliances. There is a wide category of pre-built VM's ranging from basic OS to specialized applications like ERP, CRM, file server, network backup, content application, etc. I downloaded a pre-built CentOS 5.4 server "appliance" and just ran it under Player. Voila! Instant server without any installation hassle. I also downloaded Turnkey's pre-built Wordpress appliance. Runs in Player "off-the-shelf".

Looking forward to trying out the ESXi once I buy a Core i5 or i7 box for my next project.