# ESXI 7.0.U2 # Kickstart Automation 1.2.4 # Kickstart Configuration #74,914 vmaccepteula rootpw BkGFhazcWCJTfC #install --firstdisk=nvme,local --overwritevmfs #install --firstdisk=local --overwritevmfs # Install on the first local disk available on machine install --firstdisk --overwritevmfs network --bootproto=dhcp --device=vmnic0 --addvmportgroup=0 reboot %pre --interpreter=busybox wget -q -O /dev/null 'http://192.168.200.2/automation/updateKickstartInstallationStatus.php?kickstartInstallationId=77130&securityKey=txycxzhkbdfbwkafpiskhdpchwrnfcqu&percentComplete=10&message=Installing%20Operating%20System' %post --interpreter=busybox --ignorefailure=true timeout -t 20 -s 9 wget -O /dev/null 'http://192.168.200.2/automation/completeKickstartInstallation.php?kickstartInstallationId=77130&securityKey=txycxzhkbdfbwkafpiskhdpchwrnfcqu' %firstboot --interpreter=busybox esxcli network vswitch standard uplink add --uplink-name=vmnic1 --vswitch-name=vSwitch0 esxcli network vswitch standard uplink remove --uplink-name=vmnic0 --vswitch-name=vSwitch0 esxcli network ip interface ipv4 set --interface-name=vmk0 --ipv4=66.85.132.242 --netmask=255.255.255.248 --type=static esxcfg-route 66.85.132.241 esxcli system hostname set --fqdn=RL-2388G.BL.phx0.1.141.2.13.F5.securedservers.com vim-cmd hostsvc/enable_ssh vim-cmd hostsvc/start_ssh vim-cmd hostsvc/enable_esx_shell vim-cmd hostsvc/start_esx_shell #Enable ssh password authentication #sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config LAST_CHANGED=$(cat /etc/shadow | grep "root" | awk -F ":" '{print $3}') #Calculates the number of days from 1 Jan, 1970 to current date LAST_CHANGED_NEW=`expr $(date +%s) / 86400` #Get current maximum number of days the password is valid MAXIMUM=$(cat /etc/shadow | grep "root" | awk -F ":" '{print $5}') #Set last password changed to current date - No of days from 1 jan, 1970 sed -i "1s/:$LAST_CHANGED:/:$LAST_CHANGED_NEW:/" "/etc/shadow" #Set password expiration in 2 days sed -i "1s/:$MAXIMUM:/:2:/" "/etc/shadow" services.sh restart reboot