Install VMWare tools on Gentoo

Installation of the commercial VMWare tools on a Gentoo VM, if you decide not to use the packaged open-vm-tools in the portage tree.

I derived the base of this installation from this site.

Mount the ISO and unpack

tar -xzf VMwareTools-8.3.12-559003.tar.gz


Create the rc level that Gentoo doesn’t use, but the installer script requires.

mkdir /etc/rc{0..6}.d



Create normalized paths for the installer script.

ln -s /usr/src/linux/include/generated/utsrelease.h /usr/src/linux/include/linux/utsrelease.h
ln -s /usr/src/linux/include/generated/autoconf.h /usr/src/linux/include/linux/autoconf.h



Remove any running vmware kernel modules if any. Use rmmod.

  • vmci
  • vmmemctl
  • pvscsi



Run the installer script

./vmware-install.pl



Open the installed runscript and correct the lsmod path.
Edit /etc/init.d/vmware-tools:

/sbin/lsmod to /bin/lsmod



The created server script, /etc/init.d/vmware-tools, is not a proper runscript so a working script was hacked together. Feel free to add to or modify it if you want.

Create the file /etc/init.d/vmware and paste in the script below.

#!/sbin/runscript
 
depend() {
    after logger
}
 
start() {
    ebegin "Starting VMware tools (hack)"
    /etc/init.d/vmware-tools start
    echo
    eend $?
}
 
stop() {
    ebegin "Stopping VMware tools (hack)"
    /etc/init.d/vmware-tools stop
    echo
    eend $?
}



Make the script executable and owned by root.

chmod 755 /etc/init.d/vmware
chown root.root /etc/init.d/vmware



Then add our created script to the default runlevel.

rc-update add vmware default



You can either reboot or

sudo /etc/init.d/vmware start

Leave a Reply

Your email address will not be published. Required fields are marked *