ESX & VCenter
"The guilty have the relief of knowledge"
- Samuel R. Delany, The Einstein Intersection

ESX host commands:
esxtop = displays resource utilization, running VM processes
vdf -h = lists all volumes including vmfs and free space (like df)
vmware -v = lists ESX version and build

killing vms the hard way:
vmware-cmd -l = lists VMs
ps auxfww | grep <vm name> = to get vm pid
kill -9 pid

untested: vm-support -x (find vmid for killed vm)
then use vmsupport -X vmid

alt-f1 = console
alt-f11 = standard screen
alt-f12 = vmkernel debugging

service mgmt-vmware restart
service vmware-vpxa restart
virtual center service restart
then disconnect/reconnect ESX host to cluster
finally if none of that works reboot the ESX host

error: "failure due to a malformed request to the server"
solution: service mgmt-vmware restart on host

esxcfg-info -n = network information

esxcfg-vswitch -l = list vswitches
esxcfg-vswitch -a vSwitch0 = create vswitch
esxcfg-vswitch -d vSwitch0 = delete vswitch
esxcfg-vswitch -A "VM Network" vSwitch0 = create portgroup "VM Network"
esxcfg-vswitch -L vmnic1 vSwitch0 = associate vmnic to vswitch
esxcfg-vswitch -U vmnic1 vSwitch0 = unlink vmnic from vswitch

esxcfg-vswif -l = list vswif adapter(s)
esxcfg-vswif --add --ip=<ip address> --netmask=<subnet mask> --portgroup=<portgroup name>
esxcfg-vswif -d vswif0 = delete vswif adapter

esxcfg-nics -l = list network adapters

esxcfg-swiscsi -q = display software iscsi status
esxcfg-swiscsi -e = enable sw scsi
esxcfg-swiscsi -d = disable sw scsi

rescan HBAs
esxcfg-rescan vmhba0 (vmhba1, etc)
rescan VMFS volumes
vmkfstools -V

determining HBA adapter firmware:
cd /proc/scsi/qla2300
head -4 2

LUN names:
<HBA>:<SCSI Target>:<LUN>:<partition>

ESX design
broadcom netxtreme or intel pro gigabit ethernet adapters
qlogic or emulex HBAs
seperate NICs for service console and VMs
port security on the switch must be turned off for nic teaming
HBA in lowest PCI bus/slot number
enable NTP, open port in firewall
dedicate nic to service console
dedicate nic to vmotion traffic
vswitch0 = service console vswif0, 1 nic
vswitch1 = production, 2 nics
vswitch2 = internal only lan, no nics
vswitch3 = vmotion vmkernel port, 1 nic
iscsi vmkernel port

Advanced Settings:
Disk.MaxLUN = 256

directory layout:
swap - 1.6GB (service console 800MB)
/var - seperate partition (logs and core dumps) 10GB