FreeBSD 7.2 amd64, VMWare ESXI 4.0 and DirectAdmin

I recently acquired a new Dell R610 server for my web hosting clients. Here’s how I set it up under ESXI 4.0 and configured it for the best performance.

Specifications of the Dell R610

  • 2x Intel Xeon E5530 Quad Core 2.4 GHZ
  • DDR3 24 GB at 1 GHZ
  • 6x 146GB SAS 10K RPM in RAID 6. I chose redundancy over performance (RAID 10). With the PERC 6i controller, there is very little penalty in performance when it comes to RAID 6.
  • Redundant power supplies; hot swappable drives

Initial Setup and Configuration of the Server

  1. Enable Virtualization support in the R610 BIOS. By default, it is disabled, and must be enabled for ESXI 4.0 to function properly.
  2. Install VMWare ESXI 4.0 onto the SD card. The SD card is quite reliable and is only needed to boot the ESXI kernel into memory.
  3. Once installation is complete, go ahead and create your FreeBSD 7.2 virtual machine. I gave my server 16 GB of RAM, 4 cores and about 450 GB of hard drive space.

FreeBSD Installation

Installing FreeBSD 7.2 amd64 is easy. Here is what my mounts look like:

  • / – 1024 MB
  • SWAP – 4096 MB
  • /var – 10 GB
  • /tmp – 2GB
  • /usr – the remainder, 432 GB here

FreeBSD Updating

Before we move on to installing open-vm-tools and DirectAdmin, I want to do some basic updates to the core system. I won’t be installing any of the web services (Exim, Apache, MySQL, etc.) because DirectAdmin takes care of all that for me.

  • Update ports via CVSup. This will take a bit of time the first time you run it.
  • freebsd-update fetch / install. This installs the latest security patches and keeps your FreeBSD installation up to date.
  • Install wget: make install clean -C /usr/ports/ftp/wget/. I am installing this now because I don’t want DirectAdmin to install its own version.
  • Add WITHOUT_X11=yes in /etc/rc.conf to prevent X11 stuff from installing. This is a server, not a desktop!

FreeBSD Configuration for VMWare ESXI 4.0

Install Open VM Tools:

# make install clean -C /usr/ports/emulators/open-vm-tools-nox11

An error message will appear when trying to install fusefs-kmod:

===> fusefs-kmod-0.3.9.p1.20080208_05 requires the userland sources to be installed. Set SRC_BASE if it is not in /usr/src. *** Error Code 1

The quick fix for this is as follows (source):

csup -g -L2 -h cvsup.freebsd.org /usr/share/examples/cvsup/stable-supfile

This will pull down all the userland sources and allow fusefs-kmod to compile correctly. Once the synchronization has been finished, you can go ahead and resume the installation of Open VM Tools (just type “make install clean” again).

Modify rc.conf so it loads the Open-VM-Tools:

vmware_guest_vmmemctl_enable="YES"
vmware_guestd_enable="YES"

Install DirectAdmin

Installing DirectAdmin is easy, just follow their instructions. You’re done.