Saturday, November 1, 2008

[Software] Install VMware Tools on Fedora 9

I bought a new PC with Window XP operating system. Like what I did on my old computer, I decided to install VMware workstation on Windows XP since I also need Linux/Unix environment for software development. I downloaded Fedora 9 ISO image from redhat.com and used it to build the linux guest OS on the VMware workstation. Everything for Fedora 9 installation went smoothly. After that, I began to install VMware Tools as usual (you can find a guide from VMware):

1) Select "Install VMware tools" on VMware, it will mount VMware Tools to "/media/VMware Tools" of the guest Linux OS,
2) start a terminal, type in "su", enter the root password,
3) rpm -Uhv /media/VMware\ Tools/VMware*.rpm, install the VMware Tools using RPM (or you can use extract the gz file using tar). Note, there's a space between VMware and Tools, so you need a backslash,
4) after installation, you should have a script file installed: /usr/bin/vmware-config-tools.pl
5) run rmware-config-tools.pl, it will ask you several questions, such as "which compile command to use", "kernel headers directory" etc.

However, when it goes to "kernel headers directory", it complained that the default directory /usr/src/include/linux does not exist or the kernel headers are not matched to the kernel you are running. In order to solve this problem, start a new terminal and run "rpm -qal | grep kernel", it will tell you what kernels have been installed on your guest OS and where they are located (for my case, it's under /lib/modules/2.6.6.xxx/include).

After changing the directory, it still doesn't work and continues complaining "mismatch" messages. The reason is that I upgraded the kernel but didn't reboot it. So the running kernel and the header files installed are not "synchronized" yet. Restart the OS and re-run vmware-config-tools.pl, now it's ok.

The last step of vmware configure is to set the dispaly resolution. After that, you need to restart X as it suggests. Unfortunately, another problem emerged: the mouse position messed up. I clicked the menu but it's not selected. I googled this problem, and found it's a xorg-x11-drv-vmmouse driver bug for Fedora 9 only. A work around is given in this link:

Edit /etc/X11/xorg.conf in the guest machine. Create the section if necessary:

Section "ServerFlags"
Option "NoAutoAddDevices"
EndSection

Restart X, everything goes well! Now you can enjoy the features provided by VMware, such as copy&paste between host and guest OSs, share files and folders etc.