Note: This guide is for FreeBSD 10 and up.
First things first. In order for VMware to install we need to have compat 6x installed.
cd /usr/ports/misc/compat6x && make install clean
Grab the latest vmware tools for FreeBSD here: VMware Tools For FreeBSD
Mount the iso on the hypervisor or in vsphere.
Next mount the cdrom drive in FreeBSD
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
Unmount the cdrom drive as we are finished with it.
umount /cdrom
Important: Many programs are still looking for perl in /usr/bin like for example VMware Tools here, but perl now installes itself in /usr/local/bin.
There are 2 ways of solving this issue:
Create a symlink for perl in /usr/bin like this
cd /usr/bin mv perl perl.old ln -s /usr/local/bin/perl perl
Note: The above command mv perl perl.old should result in an error as perl should not yet be there until symlinked.
Next install VMware Tools.
cd /tmp/vmware-tools-distrib ./vmware-install.pl
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
Remove the temporary install directory
cd ~ && rm -Rf /tmp/vmware-tools-distrib
A bit more work but it will work just as well. Change the path for where perl i located in the following files:
/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 above files change the following line at the top:
#!/usr/bin/perl -w
To the right path. As of perl 5.20 it's usually localed here /usr/local/bin/perl. So for the files mentioned chage the top line to:
#!/usr/local/bin/perl -w
You are now ready to run the script.
cd /tmp/vmware-tools-distrib ./vmware-install.pl
Remove the temporary install directory
cd ~ && rm -Rf /tmp/vmware-tools-distrib
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