# # #cust configurations###
P_sn= ' ESXCLI hardware platform Get | grep "Serial Number" | Awk-f ":" ' {print $NF} ' | Sed ' s///g '
P_name= ' ESXCLI hardware platform Get | grep "Product Name" | Awk-f ":" ' {print $NF} '
wget Http://10.10.10.10/config/newserver
Local_ipaddr= ' Cat NewServer | grep $P _SN | Awk-f "," ' {print '} '
#LOCAL_GATEWAY = ' Cat NewServer | grep $P _SN | Awk-f "," ' {print $} '
Local_gateway= "$ (cat NewServer | grep $P _sn | awk-f". " ' {print $ '. $ "." $ ') "." 254 "
#LOCAL_HOSTMANE = ' Cat NewServer | grep $P _SN | Awk-f "," ' {print $} '
Local_hostmane= "Lg_${p_sn}_ops"
# # #network config####
ESXCLI Network IP set--ipv6-enabled=no
ESXCLI Network vswitch Standard uplink add--uplink-name=vmnic1--vswitch-name=vswitch0
# ADD VMotion PortGroup to VSwitch0, assign it VLAN ID 5 and create a VMkernel interface
ESXCLI Network vswitch Standard portgroup add--portgroup-name=vmotion--vswitch-name=vswitch0
ESXCLI Network vswitch Standard PortGroup set--portgroup-name=vmotion--vlan-id=2060
ESXCLI Network IP interface add--interface-name=vmk0--portgroup-name=vmotion
#esxcfg-vswitch--vlan=2060--pg= "Management Network" VSwitch0
ESXCLI Network IP interface IPv4 set--interface-name=vmk0--ipv4= $LOCAL _ipaddr--netmask=255.255.255.0--type=static
ESXCLI Network IP route IPv4 add--gateway= $LOCAL _gateway--network=default
# Enable VMotion on the newly created VMkernel Vmk1
Vim-cmd Hostsvc/vmotion/vnic_set Vmk0
# Set DNS and hostname
ESXCLI system hostname Set--fqdn= $LOCAL _hostmane
ESXCLI Network IP DNS search add--domain=localdomain
ESXCLI network IP DNS server add--server=202.106.196.115
ESXCLI network IP DNS server add--server=8.8.8.8
# Set The default PSP for EMC V-max to Round Robin as that's our preferred load balancing mechanism
ESXCLI storage NMP SATP set--DEFAULT-PSP vmw_psp_rr--SATP vmw_satp_symm
# Disable NETQ #
Esxcfg-module-s force_netq=0,0,0,0 TG3
Esxcfg-advcfg-k FALSE netnetqueueenabled
# Enable SSH and the ESXi Shell
Vim-cmd Hostsvc/enable_ssh
Vim-cmd Hostsvc/start_ssh
Vim-cmd Hostsvc/enable_esx_shell
Vim-cmd Hostsvc/start_esx_shell
This article from "Let Me Men Grow Together" blog, reprint please contact the author!
VMware Summary Installation Script