Subversion hosting, CVS hosting, Trac hosting, Bugzilla hosting and software collaboration Providing hosted Subversion, CVS, Trac and Bugzilla repositories
 

March 10, 2008

Installing VMware Tools In A FreeBSD 7.0 Guest

Filed under: Operating Systems — Tags: , — Greg Larkin @ 7:35 pm

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:

cd /usr/ports/lang/perl5.8 && make WITH_GDBM=yes install clean

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:

VMware Tools Installation Failure Under FreeBSD 7.0 Guest

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:

vmware-checkvm Failure Under FreeBSD 7.0 Guest

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.

cd /usr/ports/misc/compat6x && make install clean

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!

VMware Tools Installation Fails Again

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:

unsetenv REMOTEHOST

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!

Bookmark and Share

Keep in touch,
Greg
SourceHosting.net, LLC


10 Comments

  1. 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 LaurentNo Gravatar — July 11, 2009 @ 3:46 pm

  2. Thanks !

    Comment by ANo Gravatar — July 11, 2009 @ 8:21 pm

  3. Hi Laurent,

    Excellent, I’m glad that helped!

    Cheers,
    Greg

    Comment by Greg LarkinNo Gravatar — July 13, 2009 @ 9:57 am

  4. Hi Greg,
    just wanted to say – thanks! Finally tools on FreeBSD!
    Scott

    Comment by ScottNo Gravatar — November 15, 2009 @ 9:23 am

  5. 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 ScottNo Gravatar — February 13, 2010 @ 10:08 pm

  6. 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 ChrisNo Gravatar — August 20, 2010 @ 12:42 am

  7. 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 LarkinNo Gravatar — August 20, 2010 @ 12:39 pm

  8. Thank you. Great info and research.

    Comment by reddNo Gravatar — November 26, 2010 @ 1:19 am

  9. Thanks Greg and Laurent for helping me get past this sticking point.

    Comment by T. WebsterNo Gravatar — February 17, 2011 @ 12:09 am

  10. @TWebster You are very welcome!

    Cheers,
    Greg

    Comment by Greg LarkinNo Gravatar — February 18, 2011 @ 3:57 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.


Call me - Greg Larkin: Offline

Powered by WordPress