Contents

Installing VMware Tools for FreeBSD

VMware Tools for FreeBSD include:

To install VMware Tools for FreeBSD:

  1. Power on the virtual machine.

  2. Prepare your virtual machine to install VMware Tools by selecting Settings > VMware Tools Install.

    Note: The remaining steps take place inside the virtual machine, not on the host computer.

  3. As root, mount the VMware Tools virtual CD-ROM image, copy its contents to /tmp, then unmount it:

    Note: You do not use an actual CD-ROM to install VMware Tools, nor do you need to download the CD-ROM image or burn a physical CD-ROM of this image file. The VMware Workstation software contains an ISO image that looks like a CD-ROM to your guest operating system. This image contains all the files needed to install VMware Tools in your guest operating system. When you finish installing VMware Tools, this image file no longer appears in your CD-ROM drive.

    mount /cdrom
    cp /cdrom/vmware-freebsd-tools.tar.gz /tmp
    umount /cdrom

  4. Untar the VMware Tools tar file in /tmp and install it:
    cd /tmp
    tar zxf vmware-freebsd-tools.tar.gz
    cd vmware-freebsd-tools
    ./install.pl

  5. Start X and your graphical environment if they are not started yet.

  6. In an X terminal, launch the VMware Tools background application:
    vmware-toolbox &

You may run VMware Tools as root or as a normal user. VMware Tools has additional capabilities if you run it as root.

Note: In a FreeBSD 4.5 guest operating system, sometimes VMware Tools does not start after you install VMware Tools, reboot the guest operating system or start VMware Tools on the command line in the guest. An error message appears:
Shared object "libc.so.3" not found.

The required library was not installed. This does not happen with full installations of FreeBSD 4.5, but does occur for minimal installations. To fix the problem of the missing library, complete the following steps:

  1. Insert and mount the FreeBSD 4.5 installation CD or access the ISO image file.

  2. Change directories and run the install script.
    cd /cdrom/compat3x
    ./install.sh

By default, the resolution of the X server is set to the resolution of the screen as determined at install time. If you wish to change this, you can edit the configuration file.

To configure the X server for different resolution:

  1. Locate the XF86Config file. This file stores X server configuration information and is typically located in the directory /etc/X11, or sometimes in /etc.

  2. Look for the line:
       Section "Screen"
    and under this is a line that sets the resolution:
        Modes "1280x1024"

  3. Change this line to the desired resolution. There are several example mode lines, which are commented out.

If you are dual-booting note that there is an XF86Config.vm file and an XF86Config.org file, which are linked to XF86Config, depending on whether you are booting in a virtual machine or not. Be sure to edit the correct one of these files.

Dual Booting your FreeBSD System

The install script attempts to set up your system so that it can boot either in a virtual machine or on the real hardware. These things are different in the two environments:

To handle these differences, the install script creates links to the current versions of the X server and the XF86Config file. Then it installs new versions of these files, for use when booting in a virtual machine.

The VMware Workstation install modifies the /etc/rc file (making backups to /etc/rc.old.n, where n is a number from 1 to 3). At init time, VMware Workstation's addition to /etc/rc calls checkvm to determine if the system is running in a virtual machine. If so, /etc/rc.dualconf.vm is called; otherwise /etc/rc.dualconf.org is called. These scripts switch the links to point to the correct X server and XF86Config file. They also provide a good place for the user to introduce virtual machine dependent behavior.

Note: The rc.conf link is set after the rc.conf file is read, which means it does not take effect until the next boot. If rc.conf.org and rc.conf.vm are different for your setup, then you always need to boot twice when switching from running FreeBSD in a virtual machine to running on the real machine (and vice versa). The reason for this behavior is that the rc.conf file is read in while the root file system is still mounted read-only, so the links cannot be switched before rc.conf is read in.

The installation program makes every effort to find the correct place to modify /etc/rc (before networking is set up, but after local disks have been mounted). If it is not successful, you may have to insert the lines into your /etc/rc file before networking but after local disks are mounted:

if
[ -x /etc/vmware/checkvm ]
then
if /etc/vmware/checkvm > /dev/null
then
if [ -f /etc/rc.dualconf.vm ]; 
then . /etc/rc.dualconf.vm
fi
else 
if [ -f /etc/rc.dualconf.org ]; 
then . /etc/rc.dualconf.org
fi
fi
fi

Related Topics:

Back to top

© 2002 VMware, Inc. All rights reserved.