How To Install VMware Tools On pfsense (FreeBSD)

This tutorial shows how to install VMware Tools onto pfsense v1.2.3 which is operated by the FreeBSD OS. It took me days to figure out how to do it, especially with lack of a complete guide in the Internet.

 

1 Requirements

To install such a system you will need the following:

  • Download the pfsense VMware appliance here: http://doc.pfsense.org/index.php/VMwareAppliance
  • Download and Install:
    1. VMware vCenter Converter Standalone Client
    2. VMware vSphere Client
    (How to download and install, please follow other guides)

 

2 Preliminary Note

Do not just upload the pfsense*.vmx or vmdk into the vmware datastore, use vCenter Converter instead, otherwise your pfsense-VM won't boot after you create snapshot. And I suppose you have configured the pfsense-VM, and successfully made an Internet connection.

 

3 Get to the point

First, we need to install "perl" and "compat6x-i386" onto the system prior VMware Tools installation, just like other linux. But there are many catches through the path... and this guide solved all these and goes straight to the result.

--> press "8" and go to the Shell of pfsense.

We need to update the FTP path for pkg_add command, otherwise the package won't fetch (coz the pfsense FreeBSD is not so updated to FreeBSD FTP)!

setenv PACKAGEROOT "ftp://ftp.freebsd.org"
setenv PACKAGESITE "ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.4-release/Latest/"

Start installing packages:

pkg_add -v -r perl
pkg_add -v -r compat6x-i386

Go to VMware vsphere client, and start "Install VMware Tools" onto the pfsense-VM, as usual, we need to mount the CD-ROM in order to get the VMware Tools executable.

First, we create some tmp folders first for VMware Tools:

cd /
mkdir tmp2
mkdir tmpp

Mounting the CD-ROM to tmp2:

mount_cd9660 /dev/acd0 /tmp2
cd /tmp2

Copy the VMware Tools to tmpp, then extract the package:

cp vmware-freebsd-tools.tar.gz /tmpp
cd /tmpp
tar -zxvf vmware-freebsd-tools.tar.gz
cd vmware-tools-distrib/

Then, here is the catch, before executing the installation, we need to link the compat6x files to the proper directory for VMware Tools to find, otherwise it just doesn't work!

ln -s /usr/local/lib/compat/libm.so.4 /lib
ln -s /usr/local/lib/compat/libc.so.6 /lib
ln -s /usr/local/lib/compat/libthr.so.2 /lib

Then, start the installation, make sure you are under /vmware-tools-distrib.

chmod +x vmware-install.pl bin/vmware-config-tools.pl bin/vmware-uninstall-tools.pl
./vmware-install.pl

As usual, keep pressing "Enter", and it should work with "Enjoy" message. If so, start cleaning up and reboot:

cd /
rm -r /tmpp/
rmdir tmpp
shutdown -r now

 

4 Extra note

If you get a "You are under attack" note along the way, it properly is due to the mounted CD-ROM drive, if so, press "Ctrl+Alt+Insert" to reboot the VM and start over. After all these, you should have an "OK" message in VMware vsphere client.

So, enjoy!

Share this page:

11 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Anonymous

you are the man!!! solved my problem!!! i cant find this in pfsense.org....

By: Scott Ullrich

Click System -> Packages -> Open VM Tools -> Plus sign next to package.

 

By: Angus

Yes, except the open-vm-tools do not work in pfSense 2.0...

Plus, this allows us to use the real VM Tools from VMWare.

 

AJ

By: Peter

Thanks a lot! It did the job in ESX 4.1 Update 1..!!

By: Anonymous

when trying to run the perl script ./vmware-install.pl I get the following error:

 /libexec/ld-elf.so.1: Shared object "libcrypt.so.5" not found, required by "perl

By: Anonymous

For the version 2.0 RELEASE the PACKAGESITE must be : ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/

 

 

By: Anonymous

For those using the x64 version of pfSense 2:

setenv PACKAGESITE "ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/Latest/"

Thanks for the great post btw, it helped a lot.

By: Anonymous

 Great, run OK!!! Need some adjusts:
Firewall arch : PfSense AMD64

Change:
setenv PACKAGESITE "ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.4-release/Latest/"
To
setenv PACKAGESITE "ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/Latest/"


Change:
pkg_add -v -r compat6x-i386
To
pkg_add -v -r compat6x-amd64
 

Tahnks!!!! 

 

By: Steve

Instead of trying to figure out the link used to get the packages, I just run the following command:
 

 cp /etc/skel/dot.tcshrc ~/.tcshrc

 .... and then log off and back on again.

This then allows me to run pkg_add -r ..etc 

 

 

By: Andrei

OR:

Log in to the pfSense webGUI and click System > Packages.

From the Available Packages tab list, look for the Open-VM-Tools package and click  on the right to install the package. Confirm the the package installation and then it will proceed.

There is really nothing to configure with this package, it should just work.

By: Michael

When I try to follow these steps I get an error message that the pkg_add command is not found.  How do I install the pkg_add command without being able to install packages?

I am installing on pfSense 2.4.5 release p1.