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
cd /tmp
gunzip -c /cdrom/vmware-freebsd-tools.tar.gz | tar xf –
umount /cdrom
cd vmware-tools-distrib/
./vmware-install.pl
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:
rm /etc/vmware-tools/not_configured
Now you can restart vmtools without rebooting like so:
/usr/local/etc/rc.d/vmware-tools.sh restart
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.
Hi Dan,
You’re just disabling some VMware Tools components that are not (yet) functioning on FreeBSD 9.
What is the function of these components and are they not important?
They provide accellerated networking (not needed when using the intel driver that it defaults to), and some block drivers.
The main purpose for getting the tools installed is so that you can monitor the virtual machine state, and use the guest OS shutdown/restart features.
The drivers included in the tools do not work in FreeBSD 8 or 9 – although vmtools does install under FreeBSD 8 without having to change anything.
That’s good enough for me …
why not use “emulators/open-vm-tools”?
open-vm-tools has massive dependency requirements. The binary vm-tools from vmware has just two (of which one is almost certainly going to be used on your machine anyway)
Hey when i do this the keyboard no longer workers.. just the mouse. 🙁 Any ideas?
hmm i’ve not experienced that, or had anyone else mention it before – so i’m not sure, sorry 🙁
I started a thread here on vmware’s website: http://communities.vmware.com/thread/391582 and here on the gnome website for FreeBSD http://forums.freebsd.org/showthread.php?p=167240, hopefully one of those threads will get updated. I have provided logs on both thread showing that the keyboard seems to fail on boot. My rc.conf is also provided showing that I have hald_enable=”YES”. Thanks in advance for any advice / fixes.
Could you attach your xorg.conf (located at /etc/X11), maybe I have something wrong in there…
I only use FreeBSD on servers, so they don’t have X running on them (therefore no xorg.conf) – sorry.
ended up being a xorg.conf problem!
just uncommented all the Options under InputDevice for my keyboard. More details in the thread that I linked to above. Thanks
That helped me; much appreciated!
Hey Dan, that instruction helped me a lot too. To backup the FreeBSD server VMware client the backup tool Tivoli VCB needed the vmware tools installed. But the service failed to start with message “No X install found”. So with your settings I got the vmware tools installed and now we can run the Tivoli VCB backup. Thanks
I think there has been a change somewhere. Following these instructions doesn’t not allow the tools to start.
It errors out with:
“Blocking file system:KLB vmblock.ko: depends on kernel – not available or version mismatch
linker_loadfile: Unsupported file type”
I think there needs to a plan b that includes recompiling these.
VMWorkstation 8 updated to latest yesterday
FreeBSD 9 64 downloaded and installed today
If you’re getting that message then you might not have made all the changes in the article (they are designed to prevent those things from attempting to load)
My instructions just stops the tools from loading any drivers into the kernel – it purely loads the vmtools daemon which allows communication between the host and guest.
This is what worked for me.
– If it’s a server, edit /etc/make.conf and add: WITHOUT_X11=yes
– Install latest Perl
– Install tools (Takes forever and pulls python and ruby. Doesn’t do any good to pre-install them because it uses the version it wants to use even if they are there. Pulls loads of stuff, but when it’s finished, everything works perfectly.
# make install clean -C /usr/ports/emulators/open-vm-tools
>If you’re getting that message then you might not have made all the changes in the article (they are designed to prevent those things from attempting to load)<
I followed the article to a T. It didn't work. It got rid of the errors that the article shows to block out, that part worked good. I didn't get any of those errors anymore, but I was still left with the "Blocking file system:KLB vmblock.ko" error. Either something changed, or for a normal server install, what is needed is not installed. This method also does not rely on compat6x.
It seems vmware workstation 8 does things a little different to vSphere… i’ve updated the post to include instructions to stop it loading the vmblock.ko file also.
>It seems vmware workstation 8 does things a little differenti’ve updated the post to include instructions to stop it loading the vmblock.ko file also.<
I just rolled back to a previous snapshot and tried your modified instructions. They resulted in a perfect install.
I've tried both of these methods, and they both work:
1. The method outlined here. It requires a little editing and comapt6, but it is far and away the fastest way to add them, makes the fewest system changes, and allows you to use the tools from VMware.
2. From FreeBSD packages or ports, open-vm-tools or open-vm-tools-nox11 just install and work. They don't require compat6, but uses open source VM tools.
Thanks for taking the tine to publish this. This is a solution for a problem that has frustrated many.
Dan,
I found your site. Great work.
I wanted to leave the modules enabled and just make them work, so I figured out how to do that.
So I recompiled the vmware kernel modules that were failing. Have look at how I did this:
http://www.rhyous.com/2012/05/09/installing-vmware-tools-on-freebsd-9-without-xorg/
Thanks for you article and thanks for contributing to FreeBSD knowledge!
Jared
Thanks Dan, nice to have it auto start now with your fixes.
Thanks Jared …. Error “Blocking file system:KLB vmblock.ko: depends on kernel –” is FIXED …..
Dan these steps all work in esxi and fusion so thank you so much. Saved me a ton of time!
Thanks for this! Had no idea what to do when the script simply said “aborted”, and not much info forthcoming from VMware website.
A few months later, but just FYI, the vmware tools included with ESX 5.1 now ‘officially’ support FreeBSD 9. No need to hack startup scripts or anything else. Just do the normal install by un-tarballing the package on the (virtual) CD and running the installer. That’s it.
If you’re using open-vmware-tools, make sure you uninstall it first — uninstalling it after will result in it deleting files installed by the ‘real’ installer.
Once it’s up and running you can switch over to the vmxnet3 network driver which does have some big performance and feature gains over the intel driver.
Great article. I’ve just installed VMware tools in FreeBSD 9.1. I recorded the session. You can watch it on youtube
https://www.youtube.com/watch?v=Ae0zYA56MrY
sir i am getting error while mounting cdrom,
cdrom failed : no such devices
i have uploaded the screenshot of same,please check the link.
http://i41.tinypic.com/zim9ns.png
You appear to have booted Linux not FreeBSD.
This blog contains items for FreeBSD only.
This method don´t work with pfsense 2.1 final and esxi 5.1, you get:
“Can’t locate warnings.pm in @INC (@INC contains: /usr/local/lib/perl5/5.12.4/BSDPAN /usr/local/lib/perl5/site_perl/5.12.4/mach /usr/local/lib/perl5/site_perl/5.12.4 /usr/local/lib/perl5/5.12.4/mach /usr/local/lib/perl5/5.12.4 .) at ./vmware-install.pl line 18.”
I think it is because the perl package you inject with “pkg_add -rv compat6x-amd64” itself is broken,
I got 1000+ line like “lib/perl5/5.12.4/unicore/lib/OMath/Y.pl: Write to restore size failed”
OpenVM-Tools package 8.8.1 from pfsense is broken too. This is totally embarrassing.
It’s possible that pfsense and similar modified versions of FreeBSD lack the required space to install the pre-requisites.
I’ve never really played with pfsense/freenas/etc myself, so can’t give a definitive answer 🙁
Please remember that, although pfsense is based on FreeBSD it is not FreeBSD – they do modify it.
Unfortunately you can not install VMware Tools with Xorg and gnome graphical desktop 2 in a virtual machine with VMware 9.2 running FreeBSD 9.2 system.
The (perl) which will be installed automatically with the graph of Xorg and gnome, some solucions?.
I don’t have any vms installed in this configuration to test on, so none at the moment i’m afraid 🙁
This works on ESXi 5.5 + FreeBSD 10 p12 too. Just a few steps needs to be changes.