For a first-time compilation, these package commands should be run:
sudo apt-get install build-essential
sudo apt-get install linux-headers-`uname -r`
where uname -r returns 2.6.15-52-386 (as of this writing) so we can also use:
sudo apt-get install linux-headers-2.6.15-52-386
This should install C headers for compilation here:
/usr/src/linux-headers-2.6.15-52-386
When prompted for C headers by vmware-install.pl, use this path:
/usr/src/linux-headers-2.6.15-52-386/include
From VMware Workstation select VM > Install VMware Tools... This should mount a CD-ROM such that these commands work:
cp /cdrom/*.gz /tmp/
cd /tmp
tar xvzf VM*.gz
cd vmware*
sudo ./vmware-install.pl
Verify that Ubuntu is unpacking the right kernel after boot by examining this file:
sudo vim /boot/grub/menu.lst
Set the default entry. The default entry should be the first configuration option in the file.