Guide On How To Install VMware Tools On FreeBSD

Guide On How To Install VMware Tools On FreeBSD 2017-08-04T09:53:14+00:00

A Step By Step Guide On How To Install VMware Tools On FreeBSD
Running FreeBSD in a VMware environment is quite convenient and FreeBSD runs out of the box without hassle. That said however it is recommended to install either VMware Tools or Open VM Tools. This is about installing VMware Tools.

Right first things first. In order for VMware to install without complaining we need to have compat 6x installed.

cd /usr/ports/misc/compat6x && make install clean

Next either mount the VMware Tools image from your VMware Esxi / Workstation / Player Gui (prefered) or grab VMware Tools from VMware’s site.

Mounting VMware tools from within the VMware Esxi / Workstation / Player Gui. First you need to mount the “virtual cdrom drive”. Then we will unpack VMware Tools to /tmp.

mkdir -p /cdrom
mount -t cd9660 /dev/cd0 /cdrom
cd /cdrom
tar zxvfp vmware-freebsd-tools.tar.gz -C /tmp
cd /tmp/vmware-tools-distrib

We can now unmounts the cdrom drive as we are finished with it.

umount /cdrom

“If your environment is messed up and the above does not work”

I’m writing this because I have been in this situation where I was not able to mount VMware Tools from VMware Esxi. If that is the case you can manually grab a copy of VMware Tools from VMware’s site here [download]. Once downloaded put it in /tmp and unpack it then follow the rest of the guide.

Now because many programs are stupid they still look for perl in /usr/bin like for example VMware Tools here, but as of resent perl now installs itself in /usr/local/bin. There are 2 ways to approach this issue.

Method 1:

Create a symlink for perl in /usr/bin like this

cd /usr/bin
mv perl perl.old
ln -s /usr/local/bin/perl perl

The highlighted line should result in an error if you already have perl in here something is off. Next install VMware Tools.

cd /tmp/vmware-tools-distrib
./vmware-install.pl

All done. If you don’t want to reboot your machine in order to start up VMware Tools you can invoke it manually like this.

/usr/local/bin/vmware-toolbox-cmd

Finish up by removing the temporary installation directory.

cd ~ && rm -Rf /tmp/vmware-tools-distrib

Method 2:

This one requires more work but will work just as well. In order for this to succeed we need to manually change the path for perl in the following scripts.
/tmp/vmware-tools-distrib/vmware-install.real.pl
/tmp/vmware-tools-distrib/bin/vmware-config-tools.pl
/tmp/vmware-tools-distrib/bin/vmware-uninstall-tools.pl

For the 3 files above change the following line at the top from.

#!/usr/bin/perl -w

To where perl is located. That would be /usr/local/bin/ so the 3 files should look like this at the top.

#!/usr/local/bin/perl -w

Once done we can now run the installation script.

cd /tmp/vmware-tools-distrib
./vmware-install.pl

Finish up by removing the temporary installation directory.

cd ~ && rm -Rf /tmp/vmware-tools-distrib

All done. If you don’t want to reboot your machine in order to start up VMWare Tools you can invoke it manually like this.

/usr/local/bin/vmware-toolbox-cmd

And we are done here.

Spell checkers don’t – Grammar checkers don’t either.