Installing VMware Tools In A FreeBSD 7.0 Guest
Hi everyone,
I’ve got FreeBSD 7.0 downloaded and running as a VMware Server virtual machine so I can start checking it out and get a feel for how it works. Once ZFS is deemed stable for production, I’ll plan to migrate to the 7.x series.
The first thing I generally do after setting up a new VM is install VMware Tools. Wait – scratch that. The first thing I have to do before installing VMware Tools is install Perl, since it’s not part of the FreeBSD base system. That’s easy enough:
Ok, on to the VMware Tools installer! After starting the vmware-install.pl
script, I answered a bunch of questions (used all default responses), and finally was met with this somewhat odd message:
Wait a minute – I’m pretty sure I’m installing in a virtual machine here! Initially, I pored through the installation Perl script and discovered that it executes vmware-checkvm
to determine if it’s running inside a VM or not. Ok, let’s try that by hand:
That’s a problem! vmware-checkvm
is a statically-linked binary, and to get it working, the FreeBSD compat6x port needs to be installed. The compat6x port installs a variety of libraries that were found in FreeBSD 6.x but have had their versions bumped for FreeBSD 7.0.
Hmm, still no joy after doing that – vmware-checkvm
is still core dumping. After more Googling and nosing about in the VMware Tools installation script, I learned that VMware expects the libc.so.6
library installed by compat6x to be in /lib. However, all compat{3,4,5,6}x
ports install their libraries in /usr/local/lib/compat
to avoid messing with the base system.
A simple symbolic link gets libc.so.6
in place for VMware:
ln -s /usr/local/lib/compat/libc.so.6 /lib
And now success, right? Wrong!
I’m not logged in over the network, so why am I getting this message? It turns out that tcsh (root shell in FreeBSD) is setting the REMOTEHOST environment variable, even though I’m logged in at the VM’s console.
The solution is a simple command:
Start up the VMware Tool installer one more time, and now it works!
Maybe the newest version of VMware Server supports FreeBSD 7.0 natively, so I’ll have to test that out soon. Details will be posted here when I do!
Keep in touch,
Greg
SourceHosting.net, LLC
Thank you for saving my time
Using VMWare Workstation 6.5.2, Guest FreeBSD 8.0 beta 1 64bits
#pkg_add -r compat6x-amd64
(ftp://ftp.belnet.be/mirror/ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-current/Latest/compat6x-amd64.tbz)
#ln -s /usr/local/lib/compat/libc.so.6 /lib
Comment by Laurent — July 11, 2009 @ 3:46 pm
Thanks !
Comment by A — July 11, 2009 @ 8:21 pm
Hi Laurent,
Excellent, I’m glad that helped!
Cheers,
Greg
Comment by Greg Larkin — July 13, 2009 @ 9:57 am
Hi Greg,
just wanted to say – thanks! Finally tools on FreeBSD!
Scott
Comment by Scott — November 15, 2009 @ 9:23 am
Hi,
I just want to say THANKS! for the article. Installing the tools was one of those nagging long term things that is now solved.
Great work,
Scott
Comment by Scott — February 13, 2010 @ 10:08 pm
Have you noticed any issues with the tools? A colleague has experienced problems with IRQ’s and erratic clock drift in the past. Could you please tell us which version of the tools you intsalled?
Chris
Comment by Chris — August 20, 2010 @ 12:42 am
Hi Chris,
I haven’t seen any problem with IRQs inside of VMware virtual machines before, but there can be problems with clock synchronization, depending on how your OS is configured.
Make sure you’re using “tools.syncTime=TRUE” in your .vmx file, and for certain versions of FreeBSD, you may have to change the kernel hz setting (http://ivoras.net/freebsd/vmware.html).
At the time this posting was written, I was using the standard VMware tools included with VMware Server 1.0.x. It resides in the installation folder as freebsd.iso. At this point, you might want to consider open-vm-tools instead: http://open-vm-tools.sourceforge.net/
Hope that helps,
Greg
Comment by Greg Larkin — August 20, 2010 @ 12:39 pm
Thank you. Great info and research.
Comment by redd — November 26, 2010 @ 1:19 am
Thanks Greg and Laurent for helping me get past this sticking point.
Comment by T. Webster — February 17, 2011 @ 12:09 am
@TWebster You are very welcome!
Cheers,
Greg
Comment by Greg Larkin — February 18, 2011 @ 3:57 pm