Sunday, December 16, 2007
Saturday, December 15, 2007
ESXGuide - esxcfg VMware console tool
ESXGuide - esxcfg VMware console tool
esxcfg tool Management in the console
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=Hostbusadapter (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
esxcfg tool Management in the console
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=Hostbusadapter (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
Round-Robin Load Balancing - VMware ESX Server 3.5, VMware ESX Server 3i version 3.5, VMware VirtualCenter 2.5
http://www.vmware.com/pdf/vi3_35_25_roundrobin.pdf
The following options are supported and discussed in more detail in Table 1.
esxcfg-mpath --lun [--policy [mru|rr|fixed|custom]]
[--custom-hba-policy|-H [mru|preferred|any|minq]] |
[--custom-target-policy|-T [mru|preferred|any]] |
[--custom-max-commands|-C] |
[--custom-max-blocks|-B]
Notes
If you set the custom-max-blocks and custom-max-commands, options, the system attempts to switch paths
as soon as one of the limits is reached.
If you set the target or the HBA policy to preferred, the system chooses the target or the HBA of the preferred
path when possible. If a preferred policy is set on an active/passive SAN array, and the preferred target is not
on the active SP (Storage Processor), the system does not select the preferred target but a target on the active SP.
Path switching is not performed if an outstanding SCSI reservation is on the target, or if a path failover is
underway. Path switching is delayed until an I/O request is performed when no reservations or path failovers
are pending.
Table 1. Policy Options for esxcfg-mpath
Option Description
--policy
-p
[mru|rr|fixed|custom]
Set the policy for a given LUN to mru, rr, fixed, or custom. This option requires that
the --lun option is also passed to indicate the LUN to set the policy for.
Most recently used (mru) selects the path most recently used to send I/O to a device.
Round robin (rr) uses the mru target selection policy and the any HBA selection
policy to select paths.
Fixed (fixed) uses only the active path.
Custom (custom) sets the LUN to expect a custom policy.
NOTE After you’ve set the policy to custom for a LUN, you can specify one or more of
the other options. For any LUN, you set the policy to custom only once.
--custom-hba-policy
-H
Selection policy for the HBA. Use one of the following:
preferred — Use the HBA that’s part of the preferred path.
mru – Use the most recently used HBA.
minq – HBA that has the smallest number of outstanding I/O commands when the
ESX Server system does the path selection.
any – Use any available HBA.
--custom-target-policy
-T
Selection policy for the target. Use one of the following:
preferred – Use the target that is part of the preferred path.
mru – Use the most recently used target.
any – Use any available target.
--custom-max-commands
-C
Maximum number of I/O requests to be issued on a given path before the system tries
to select a different path. A setting of zero (0) disables switching based on commands.
Specify the number of commands as an integer. Default is 50.
--custom-max-blocks
-B
Maximum number of I/O blocks to be issued on a given path before the system tries to
select a different path. A setting of zero (0) disables switching based on blocks.
Specify the number of blocks as an integer. Default is 2048.
The following options are supported and discussed in more detail in Table 1.
esxcfg-mpath --lun
[--custom-hba-policy|-H [mru|preferred|any|minq]] |
[--custom-target-policy|-T [mru|preferred|any]] |
[--custom-max-commands|-C
[--custom-max-blocks|-B
Notes
If you set the custom-max-blocks and custom-max-commands, options, the system attempts to switch paths
as soon as one of the limits is reached.
If you set the target or the HBA policy to preferred, the system chooses the target or the HBA of the preferred
path when possible. If a preferred policy is set on an active/passive SAN array, and the preferred target is not
on the active SP (Storage Processor), the system does not select the preferred target but a target on the active SP.
Path switching is not performed if an outstanding SCSI reservation is on the target, or if a path failover is
underway. Path switching is delayed until an I/O request is performed when no reservations or path failovers
are pending.
Table 1. Policy Options for esxcfg-mpath
Option Description
--policy
-p
[mru|rr|fixed|custom]
Set the policy for a given LUN to mru, rr, fixed, or custom. This option requires that
the --lun option is also passed to indicate the LUN to set the policy for.
Most recently used (mru) selects the path most recently used to send I/O to a device.
Round robin (rr) uses the mru target selection policy and the any HBA selection
policy to select paths.
Fixed (fixed) uses only the active path.
Custom (custom) sets the LUN to expect a custom policy.
NOTE After you’ve set the policy to custom for a LUN, you can specify one or more of
the other options. For any LUN, you set the policy to custom only once.
--custom-hba-policy
-H
Selection policy for the HBA. Use one of the following:
preferred — Use the HBA that’s part of the preferred path.
mru – Use the most recently used HBA.
minq – HBA that has the smallest number of outstanding I/O commands when the
ESX Server system does the path selection.
any – Use any available HBA.
--custom-target-policy
-T
Selection policy for the target. Use one of the following:
preferred – Use the target that is part of the preferred path.
mru – Use the most recently used target.
any – Use any available target.
--custom-max-commands
-C
Maximum number of I/O requests to be issued on a given path before the system tries
to select a different path. A setting of zero (0) disables switching based on commands.
Specify the number of commands as an integer. Default is 50.
--custom-max-blocks
-B
Maximum number of I/O blocks to be issued on a given path before the system tries to
select a different path. A setting of zero (0) disables switching based on blocks.
Specify the number of blocks as an integer. Default is 2048.
Subscribe to:
Posts (Atom)