FreeBSD
Performance regressions in FreeBSD 7.1
There is a regression for performance under VMware ESXi 3.5.0? and FreeBSD 7.1 with regards to disk. I have found that the following fixes the problem and brings disk performance back up to levels from FreeBSD 7.0:
/boot/loader.conf
kern.hz=100
/etc/sysctl.conf
vfs.read_max=256
/etc/rc.local
camcontrol tags da0 -N 127 camcontrol negotiate 0:0 -a -W 16 -O 127 -R 160.000
Open source VMware tools
For VMware guest tools on FreeBSD, you should use the new open source "open-vm-tools":
To install the port
Make sure that you have /usr/src to be able to build the kernel modules.
cd /usr/ports/emulators/open-vm-tools-nox11 make install
/etc/rc.conf
vmware_guest_vmmemctl_enable="YES" vmware_guestd_enable="YES"
Integrating 3ware 9650SE drivers
The following instructions will allow you to install ESXi as the system device on a 3ware 9650SE controller. I will show you how to use a USB key as the installation medium for ESXi. I will explain how to edit both the root oem.tgz on the installation disc as well as the disk image used for hard drive installation, the drivers that we will use will be the oem.tgz provided by 3ware on their support site. This guide assumes that you have ESXi 3.5.0 Update 4 and decent knowledge of Linux.
Preparation
- Download VMware ESXi Update 4 ISO (named VMware-VMvisor-InstallerCD-3.5.0_Update_4-153875.i386.iso for Update 4) from the VMware website to your /tmp directory,
- A blank USB key of at least 512Mb for VMware ESXi installation,
- A Linux (Ubuntu used in this example) workstation available for creation of the VMware ESXi installation.
Step by Step instructions
To prepare your workstation for making an ESXi USB medium, you can execute the following commands (We will assume you are using 'root' for all commands):
To install the syslinux package on Ubuntu to make your USB key bootable, and make temporary directories used to house the ESXI images:
mkdir -p /mnt/usb /mnt/esxi /mnt/esxi-dd /tmp/esxi /tmp/esxi-install apt-get install syslinux
Now we need to format & mount the USB key and mount the ESXi installation disc downloaded via ISO, Warning: Your USB key may not be /dev/sdb, please verify what device your USB is before proceeding.
mkfs -t msdos /dev/sdb1 mount /dev/sdb1 /mnt/usb mount -o loop /tmp/VMware-VMvisor-InstallerCD-3.5.0_Update_4-153875.i386.iso /mnt/esxi
Copy the ESXi installation disc that was mounted on /mnt/esxi and unmount it after copying, prepare for syslinux usage:
cp -Rp /mnt/esxi/* /tmp/esxi cp -p /tmp/esxi/isolinux.cfg /tmp/esxi/syslinux.cfg umount /mnt/esxi
Download the oem.tgz provided by 3Ware support & intergrate it into the first stage of the installation disc:
wget -O /tmp/oem.tgz "http://www.3ware.com/kb/attachments/oem-GUID37c5a5bac94746b990d406364588bb63.tgz" cp -p /tmp/oem.tgz /tmp/esxi/oem.tgz
Now we are going to update/extract the installation image (install.tgz) which is extracted to the hard drive on the ESXi host:
cd /tmp/esxi-install tar -zxvpf /tmp/esxi/install.tgz cd /tmp/esxi-install/usr/lib/vmware/installer bunzip2 VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd.bz2
We need to find out the sector size of the dd image so that we can mount the appropriate command, it can be accomplished by doing:
fdisk -ul VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd
You should receive a command output like this:
root@ubuntu:/tmp/esxi-install/usr/lib/vmware/installer# fdisk -ul VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd
You must set cylinders.
You can do this from the extra functions menu.
Disk VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd: 0 MB, 0 bytes
64 heads, 32 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd1 8192 1535999 763904 5 Extended
VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd4 * 32 8191 4080 4 FAT16 <32M
VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd5 8224 106495 49136 6 FAT16
VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd6 106528 204799 49136 6 FAT16
VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd7 204832 430079 112624 fc VMware VMKCORE
VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd8 430112 1535999 552944 6 FAT16
Partition table entries are not in disk order
You most likely will want to mount the one that is bolded, labeled dd5, so we can issue the following to mount the DD image and copy the update oem.tgz provided by 3ware support to it:
mount -o loop,offset=$((512*8224)) VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd /mnt/esxi-dd cp -p /tmp/oem.tgz /mnt/esxi-dd umount /mnt/esxi-dd
Now we must re-bzip2 the image for reintergration into install.tgz, we must also recompress install.tgz:
bzip2 VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd cd /tmp/esxi-install rm /tmp/esxi/install.tgz tar -czvf /tmp/esxi/install.tgz sbin/ usr/
We are done the major parts of the update to the disc now, lets copy it to the USB key and initialize syslinux:
cp -Rp /tmp/esxi/* /mnt/usb syslinux -s /dev/sdb1 umount /dev/sdb1 cat /usr/lib/syslinux/mbr.bin > /dev/sdb
Everything should be done, now you can boot from the ESXi key and install your ESXi host on barebones 3ware 9650SE — Make sure your USB key is bootable!