Sunday, October 26, 2008

esxcfg Command Breakdown

esxcfg-rescan

esxcfg-rescan vmhba1

esxcfg-rescan vmhba2

Rescan vmhbas

esxcfg-mpath -l
VMware ESX Server multipathing information
Disk vmhba1:3:6 /dev/sdu (225280MB) has 2 paths and policy of Most Recently Used
FC 2:1.0 210000e08b0246af<->201400a0b81167e2 vmhba1:3:6 On active preferred
FC 4:1.0 210000e08b02e4a0<->201500a0b81167e2 vmhba2:3:6 Standby

Multipathing
of HBAS
listing and configure

esxcfg-vmhbadevs -m
See the relationship between vmhba and devnames. This produces an output like so:
vmhba1:3:6:1 /dev/sdu1 44ebf538-51cc7998-2525-00145e1b556a
vdf
/vmfs/volumes/44ebf538-51cc7998-2525-00145e1b556a
230424576 44748800 185675776 19% /vmfs/volumes/CoreDomain
Relationship between
Vmhbas and devname

ls /vmfs/devices/disks/

list all your disks/luns like so:vmhba0:0:0:0

vmhba0:1:0:0
vmhba1:2:0:0
vmhba1:3:0:0
vmhba1:4:0:0
vmhba1:5:0:0
vmhba1:6:0:0
vml.02000000003343453035595041202020203731303638315430535831373334
vml.0200000000334345303634504b202020203731303545464853535831373334
vml.0200000000334345304150415420202020373131384b51305a535831373334
vml.0200000000334345304244584e202020203731313835485231535831373334
vml.0200000000334345304446543230303030373132314e4c5a57535431373334
vml.02000000005546413350323330375352544d414e333336
vml.02000000005546413350323330375442444d414e333336

You can then use fdisk to work out if the disks are blank of partitioned with:
fdisk /vmfs/devices/disks/vmhba1:5:0:0
Not an esxcfg command but very useful

Identify the LUN Disk and Partition
vmhbax:y:z:v
x=ostbusadapter (0=mostly internal SCSI Adapter, 1=mostliy fibrechannel 1...x)
y=LUN
z=Disk
v=Partition
esxcfg-firewall

esxcfg-firewall --openPort

esxcfg-firewall --closePort

port: Apllication Port
Protocol:tcp or udp
Direction: in or out
name: Descriptive name of rule

esxcfg-firewall -q to query settings

Example:

esxcfg-firewall --openPort 14247,tcp,out,IBMDirector

You cannot configure unsupported services through the VI Client.
Firewall settings

esxcfg-vmhbadevs

vmhba0:0:0 /dev/sda

vmhba0:1:0 /dev/sdb

vmhba0:2:0 /dev/sdc

Map of VMkernel storage devices to service console devices

VMkernel storage devices to service console devices
esxcfg-vswitch

esxcfg-vswif -i 192.168.1.55 -n 255.255.255.0 vswf0

Creates and updates virtual machine network settings

Change IP Address and Subnetmask

No comments:

Blog Archive