Monday, May 01, 2006

Fedora Core 5 on VMware Server Beta

A dream has been realized. Linux integrated beautifully on a Windows-based platform. For months I've been eyeing the VMware Server Beta release, free for download, and simulatneously Fedora Core 5 (FC5), free ("as in beer") for just about anything. Finally my schedule became free enough to put them together for a test drive. Here are my installation and setup notes, recorded for posterity's sake and your perusal in a concerted effort not to reinvent the wheel if possible.

The Download Process
Downloading is usually fairly straightforward, but as usual when it comes to Linux, the options can be a bit daunting at first. My route was to find a mirror site for FC5. Some mirrors are horrors, some are fast. The Stanford one brought in the full 3.1GB in about 1.5 hr. Picking that site and finding which file to download took about 1.5 hr prior to the download.

BitTorrent proved slow, though of course don't let that prevent you from trying it—after all, the more users, the faster it goes. Mirror sites can be hit-n-miss, with some dribbling bits, and other gushing them out. My first try, from a site near my home and not the first on the list, rocketed the data to my computer, so I was grateful.

The question of whether to download the CD vs. DVD images isn't trivial. My target was VMware Server, released for free download and usage as Beta 2, build 22874. I had originally intended to make the install on my copy of Microsoft VirtualPC 2004 SP1, which would have required me to download the CD images since VPC doesn't accept CD images larger than 2.2GB (see FAQ #7.8). I read that people had succesfully installed FC5 from DVD on VMware, so I went with the DVD download and switched target platforms. Of course, I could have just downloaded the CDs and stuck with VPC, VMware also held the promise of company-supported integration with Linux, unlike that in the Microsoft virtualization software.

Now I had to downoad and register the VMware product. Registration requires little more personal info than a name and email address, and soon the installation package was on my desktop.

Installation
VMware Server Beta
The VMwarea installation went without a glitch and but one hitch. "Hitch" in the sense that I received a warning that I needed to install Microsfot Internet Information Services (IIS) to take full advantage of the server software, and apparently IIS is for the Windows Server 2003 operating system, whereas I was running Windows XP SP2. I clicked to continue anyway and, in my perhaps still naive retrospect, made the right decision.

FC5
As might be expected, the Fedora installation was a bit more involved—but fortunately not considerably. In VMware, I created a new virtual machine, and to my pleasant surprise, I found in its wizard an optimized installation for Red Hat Linux! I coudln't believe. Never found such a thing in MS VPC.

Before starting the virtual machine, I needed to set the CD drive to point to the iso image of the FC5 download. When the machine started, it would boot straight from the DVD to begin the FC5 installation. But before that, I would need to make one extra addition. I had created an 8.0GB SCSI hard drive (the default), but FC5 didn't detect the hard drive. I needed to change the settings from a BusLogic to LSI Logic SCSI hard drive. The official VMware workaround showed me a quick, manual fix to get the drive in order after I had already created it. Picking the "LSI Logic" hard drive option from the start probably would have prevented the mix-up.

In previous installations, I had always skimped on CD images and downloaded but the first rather than the full complement of five, opting instead to make a minimal installation and yum the rest—i.e. use "yum" to update the packages and install any extras. With the DVD on hand this time, I didn't need to worry about that, but could install a complete system and yum updates afterward. Not as minimalist and clean, but perhaps a bit simpler.

FC5 itself installed without a hitch or a glitch. X worked out of the box, and soon I was browsing the web on Firefox!

Setup
The main issue for setup is a gem in itself. VMware has the grace to support Linux systems. That means that VMware actually supplies a set of tools to make the virtual machine act more as if it were simply another application on the host system. For example, with the VMware Tools, the mouse can navigate seamlessly from the host into the virtual machine and back out again, without having to click on the machine or use a special key combination to get out. VPC doesn't provide such tools for virtual machines running Linux or FreeBSD.

Installing these tools takes a bit of mucking around. One post helped me not to reinvent the wheel. Note that the link points to the second page of the forum thread, where the first entry on that page has an updated, step-by-step approach to installing the tools from the ground up. Another note is to edit the link to the Tools software from "http://ftp.cvut.ce/vmware," to "http://ftp.cvut.cz/vmware". In the final steps, rmmod, depmod, and modprobe need to be preceded with /sbin/, as in /sbin/rmmod.

One other trouble I ran into was that the network suddenly stopped being able to find an IP address. For several restarts after installation, I had been able to connect in the virtual machine through the default bridged networking in VMware, but when it stopped working, I switched to NAT networking, which at least for now has worked well.

Closing Thoughts
I had a dream. A dream that has now become a reality. Albeit a very small dream—simple pleasures, shall we call it? I hope it was something at least resembling a pleasure to read, and I can at least guarantee it was a joy to write—from right here in FC5 on VMware!

Updates
  • Installing Tools. Improvements leading to the v.1.0.0 release seem to have addressed some of the Tools installation hassles. I only had to install one Tools file, via the built-in "Install VMware Tools..." entry in the VM menu, which downloaded an rpm into Linux. After installation, I ran the perl script /usr/bin/vmware-config-tools.pl. Note that the script requires the package kernel-devel, which can be installed as an rpm through yum (yum install kernel-devel as root). One of the surprisingly trickiest parts was actually finding the program to run the installed Tools. It turned out to be /usr/lib/vmware-tools/bin32/vmware-toolbox, which needs to be run each time a session is started in X.

  • Time synchronization. One of the nifty features of Tools is that it keeps the guest OS clock synchronized with that of the host system. System time can become particularly important when synchronizing files with CVS or even sending out emails through Mozilla Thunderbird, problems I encountered while using Linux in MS Virtual PC 2004. For a time, Tools kept the clock synchronized in VMware, but out of the blue, it couldn't keep time anymore. What happened? A wiki web posting helped me realize that Tools needs to be updated each time a new kernel is installed and loaded. Simply re-running the perl setup script did the trick, and time is now back in sync.