Monthly Archives: March 2008

VMware – No Developer Should Be Without It

Many years ago, a colleague told me how he no longer needed to use Windows on his laptop, because he had something called VMware.

The main attraction for me of VMware is that it allows me to test things on Windows without having to re-boot my computer or even fire up a separate machine.

At one point, I even acquired an evaluation license for VMware, but getting it all working just looked too hard.

In a recent correspondence with one of my learned colleagues at GAWDS, the – in my mind – unlikely combination of the words ‘VMware’, ‘installation’ and ‘easy’ came together. I thought then that maybe it was time to have another, and closer, look at this product.

After looking at various wikis, I was under the impression that it might be able to run my dual-boot Windows XP partition through VMware, under Linux. That is, I boot Linux, then run Windows in a virtual machine. The thought of being able to do this without having to reboot into the other operating system was very attractive – so much so that I purchased and downloaded VMware Workstation.

VMware Workstation is available both as an rpm package for those using RedHat and SuSE-derived distributions, and as a tarball. I had a quick look to see if there was a Gentoo ebuild available, but it appeared that all the recent editions were masked so I elected to use the ‘official’ tarball, as I might at least be able to get some support if things went wrong.

The installer in the VMware Workstation tarball assumes that somewhere on the system there are directories rc0.d through rc6.d. On Gentoo, this is not the case. I ended up creating these directories, just so I could get the installer to to its work. Installation went smoothly and none of the questions asked raised any issues or caused me to seek help. A reboot was required before things would work correctly and I had to invoke the programme thus:

VMWARE_USE_SHIPPED_GTK="yes" vmware

I followed the appropriate instructions to set up my Windows partition to run as a virtual machine, started the virtual machine, selected the ‘Windows’ option on the Grub menu and had the whole machine freeze on me. This was starting to seem too much like hard work. The instructions advised that the preferred method was to install the guest system in a virtual disc rather than running from the physical disc. I decided that I wasn’t going to be nuts about trying to get the physical disc thing working, so dug out a Windows XP Home Edition DVD and key which I wasn’t using and installed from scratch.

I have to confess that I was expecting all sorts of horrible things to happen, but the installation and application of all the Windows updates since XP Service Pack 1 went without a hitch. Everything just worked.

The ultimate test was to see whether I could install iTunes, restore the iTunes directory from my backup (not a backup made through iTunes, I hasten to add) and get my iPod to synchronise. (As I am not doing much testing with Internet Explorer at the moment, iTunes is currently the most frequent reason for having to reboot into Windows.) My backup had been made by rsynch’ing the iTunes directory to my file server, under Cygwin. Once again, I was expecting something horrible to happen when I started the DRM-rich iTunes. Once again, nothing horrible did happen – I just got asked for my password and had to authorize the ‘new’ computer with the iTunes store.

Plugging in my iPod brought up a message saying that VMware was having to disconnect it from the regular driver (USB storage, through udev) to enable it to work with iTunes – I paniced a bit when I saw the message, but was quickly relieved when I saw my iPod appear in the iTunes window. I even purchased the album “She’s So Unusual” by Cyndi Lauper and installed it on my iPod.

The preload Windows partition is now – as far as I am concerned – totally redundant. In fact, I have now deleted it, formatted it as ext3 and now have the directory containing my virtual machine mounted on it. Important: before ‘blowing away’ the original Windows partition, I first went into iTunes and de-authorised the machine.  If I had not, my iTunes music would be authorised for only four computers – the other one being lost.  I don’t know if there is any way in which one can ask Apple to de-authorise a machine that no longer exists, but think it better to take this simple step rather than having the problem in the first place.

Whilst I think that VMware is an excellent piece of software – far easier to use than anticipated – and that every developer should have a copy, I would make one caveat: running virtual machines needs powerful hardware unless one likes having a machine that runs slightly slower than continental drift.  The laptop on which I am running VMware has a dual-core 1.85GHz processor and 1.5Gb RAM.  (0.5Gb allocated to VMware, along with 1 CPU core.)  I would not want to try running with less resources and am considering upgrading to 3Gb RAM so that the virtual machine can run with a full 1Gb, the rest being left for the GNU/Linux system.