Saturday, May 12, 2007

VMWare and FreeBSD

My biggest problem with running an OS under virtualization is clock drift. The default settings for nearly every OS I install has some form of clock drift. I have no idea if this will help anyone, but here are my settings for FreeBSD 6.2+ under VMware.

First, I always rebuild my kernel. There are two Lance drivers. The lnc and the le. The le driver is newer and has better considerations for locking. I comment out the slower, more trusted lnc device and replace it with the newer one:
#device lnc
device le

FreeBSD 6.1+, and maybe some older versions, support both the BusLogic (bt) and the LSI Logic (mpt) SCSI adapters. I personally recomend the BusLogic driver. I forget the exact details, but in the VMWare certification classes, they said the BusLogic driver was the better performing driver.

I also enable device polling in order to gain some possible speed boosts. I believe this also reduces error messages you may see from the lnc driver:
options HZ=100

And lastly in the kernel world, I comment out apic. The device apic line is technically deprecated according to the NOTES file, but it is still in there anyway.
#device apic

After rebuilding/installing the world, I also make the following changes to /boot/loader.conf. These lines really just reinforce what I did in the kernel configuration file and should work even if you don't rebuild your kernel:

After all this, you shouldn't see any error messages from the lnc driver, and you shouldn't see any issues with clock drift. I am still trying to figure out the best way to get the vmxnet driver working.