Hi,
What all the commands that can be used in ESX Server & what purpose?
Thanks,
Heyram
Some of most used (by me ...).
#Enter into Maintenance Mode
vimsh -n -e /hostsvc/maintenance_mode_enter
#Exit from Maintenance Mode
vimsh -n -e /hostsvc/maintenance_mode_exit
#Checking Maintenance Mode
vimsh -n -e /hostsvc/runtimeinfo | grep inMaintenanceMode | awk ‘{print $3}’
#Temporarily open all ports through the ESX firewall:
esxcfg-firewall -allowIncoming
esxcfg-firewall -allowOutgoing
#Enable services through the ESX firewall:
esxcfg-firewall -e sshClient
esxcfg-firewall -e ntpClient
#Unload the VMFS-2 module to improve LUN and volume scan speed and improve overall performance:
vmkload_mod -u vmfs2
#Ensure the firewall is enabled and running before final build completion:
service firewall start
esxcfg-firewall -blockIncoming
esxcfg-firewall -blockOutgoing
#create portgroup for the Production VLAN and tag with id: 2 because this is configured as the native VLAN
esxcfg-vswitch -A LAN vm_switch0
esxcfg-vswitch -p LAN vm_switch0 -v 2
#Configure time zone and NTP:
cp /etc/ntp.conf /etc/ntp.orig
ln -sf /usr/share/zoneinfo/Europe/Italy /etc/localtime
echo “server 0.vmware.pool.ntp.org” >> /etc/ntp.conf
echo “server 0.vmware.pool.ntp.org” >> /etc/ntp/step-tickers
esxcfg-firewall -e ntpClient
chkconfig –level 345 ntpd on
service ntpd restart
hwclock –systohc
#SAN multipathing best practice:
esxcfg-advcfg -s 1 /Disk/UseLunReset
esxcfg-advcfg -s 0 /Disk/UseDeviceReset
service mgmt-vmware restart
#Set Disk.MaxLUN to 40 to reduce rescan time:
esxcfg-advcfg -s 40 /Disk/MaxLUN
service mgmt-vmware restart
#Inject install completion date/time stamp into Message Of The Day:
dateTime=`date ‘+%c’`
echo “Built on “$dateTime” by Riccardo Riva.” > /etc/motd
Bye
Riccardo Riva
VCP,RHCE,FCNSA
If you found this or other information useful, please consider awarding points for "Correct" or "Helpful". Thank You!
Also check out http://www.b2v.co.uk/b2vguide2vmware3.htm
http://www.vmware.com/support/pubs/vi_pages/vi_pubs_35u2.html
http://www.esxguide.com/esx/content/view/2/25/
Duncan
VMware Communities User Moderator | VCP | VCDX
-
Blogging: http://www.yellow-bricks.com
If you find this information useful, please award points for "correct" or "helpful".