To install vmware tools in FreeBSD 9, follow these instructions…
First, ensure that you have perl and compat6x ports/packages installed.
You can use pkg_add -r perl5 compat6x (or pkg_add -r perl compat6x-amd64 if the previous command does not work – substitute amd64 for i386 if installing i386 edition!) for pre-compiled, or use the ports tree.
Next, in vSphere client go to guest -> install vmware tools. This will mount the tools CDROM in the virtual machine.
Next, we need to mount the cd drive, extract the data, unmount the cd drive and install the tools – do the following as root:
mkdir -p /cdrom
mount -t cd9660 /dev/cd0 /cdrom
gunzip -c /cdrom/vmware-freebsd-tools.tar.gz | tar xf –
At this point, accept all the defaults (press enter to all questions) until you are returned to a shell prompt. Ignore the ‘failed’ service start, and the fact that it says the process has been aborted.
Next, you need to use your favourite editor to edit the file /usr/local/etc/rc.d/vmware-tools.sh and locate the following 3 lines of code (they are separated by a few lines of code but are all in the same general area):
if [ “$vmdb_answer_VMHGFS_CONFED” = ‘yes’ ]; then
if [ “$vmdb_answer_VMMEMCTL_CONFED” = ‘yes’ ]; then
if [ “$?” -eq 0 -a “$vmdb_answer_VMXNET_CONFED” = ‘yes’ ]; then
There will also be (not grouped together like the above line) the following line in the file:
if [ “$vmdb_answer_VMBLOCK_CONFED” = ‘yes’ ]; then
Change each of the above lines where it says yes to be xyes (add the letter X before the word yes) – then save&exit the file.
Now we need to tell vmtools that it is configured by typing the following:
Now you can restart vmtools without rebooting like so:
Now, you will need to Edit Settings in vSphere client and set your cdrom drive back to the client device.
Each time your virtual machine boots up, it will boot the vmtools and work as expected.