The VMware FreeBSD Tools include

A. The X server to run in a virtual machine for SVGA display modes.
B. The vmware-toolbox program to access virtual machine settings from the
   guest operating system.
C. Support for dual booting a BSD partition either in a virtual machine or
   on the real machine.


Installing the VMware FreeBSD Tools
-----------------------------------

1.  Download VMware FreeBSD Tools:
                                  
    The VMware FreeBSD Tools can be downloaded from http://www.vmware.com.

2.  Setting up your system

    For full functionality, VMware FreeBSD Tools require your system
    already have X windows installed and configured.  If you install
    and configure an X server after installing the tools, it may be
    necessary to re-install the tools.

    In addition, use of the vmware-toolbox requires you have tcl and tk
    installed on your system.  If you install the FreeBSD tools without
    tcl/tk, the X server and dualboot will still work properly; however,
    the vmware-toolbox program will report an error. If this occurs, you
    can install tcl/tk after the VMware tools.  Re-installation of the
    tools is not necessary.

3.  Installing VMware FreeBSD Tools:

    After downloading the file, unpack it:

        tar xzf tools-for-freebsd-xxx.tar.gz

    Go to the vmware-freebsd-tools directory:

        cd vmware-freebsd-tools

    Become root:

        su

    Run the install script:

        ./install.pl


4.  VMware FreeBSD Tools have been installed.  Type startx (or however
    you normally start the X server) to run the VMware X server.


5.  When X is up, run the vmware-toolbox program and use it to change
    some of the virtual machine settings from the guest operating 
    system.


Configuring the X Server
------------------------

The X Server configuration information is stored in the file XF86Config,
in the directory /etc/X11, or sometimes in /etc.  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 config file.

Look for the line:
    Section "Screen"
and under this there will be a line that sets the resolution:
    Modes "1280x1024"
Change this to be the desired resolution.  There are several example
mode lines, which are commented out.

If you are dual booting (see below) note 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 it can boot either
in a virtual machine or on the real hardware.  These things are different
in the two environments:

1.  The VMware X server should be run in the virtual machine, instead of
    the native X server.

2.  The X config file is different.

3.  The device configuration is different.  The virtual machine emulates
    an AMD Lance ethernet card, and a SoundBlaster sound card, regardless
    of the actual hardware present on the machine.  Generic FreeBSD kernels
    should provide support for these devices automatically.  If you intend
    to dualboot with a custom kernel, you must ensure that it provides
    support for both your real hardware and the emulated products (AMD
    Lance and Soundblaster).

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

The VMware 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'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 X config file.  They also provide a good 
place for the user to introduce virtual machine dependent behavior (just
remember that any future installations of VMware will clobber these files).

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 will always have 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 behaviour is 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 will make 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:

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

in your /etc/rc file, before networking but after local disks are mounted.


