## - NOTE: Replace -v 0 with VLAN Numbers that represent your network... ## - Accepts EULA, Sets root Password1, Wipes First Disk, Sets Management IP, DNS, Hostname, Removes Default "VM Network" and sets VLANID vmaccepteula rootpw Password1 install --firstdisk --overwritevmfs network --device=vmnic0 --bootproto=static --ip=[SERV_IP] --netmask=255.255.255.0 --gateway=192.168.4.1 --nameserver="192.168.3.130","192.168.3.131" --hostname=[HOSTNAME] --addvmportgroup=0 --vlanid=0 reboot %firstboot --interpreter=busybox ## - Put host into maintenance mode - and wait for task to complete vim-cmd hostsvc/maintenance_mode_enter vsleep 5 ## - Further configuration of resolv.conf for DNS... /bin/cat >"${ROOT}/etc/resolv.conf" < /etc/ntp.conf echo "restrict kod nomodify notrap noquery nopeer" >> /etc/ntp.conf echo "restrict 127.0.0.1" >> /etc/ntp.conf echo "server 0.uk.pool.ntp.org" >> /etc/ntp.conf echo "server 1.uk.pool.ntp.org" >> /etc/ntp.conf echo "driftfile /var/lib/ntp/drift" >> /etc/ntp.conf echo "0.uk.pool.ntp.org" >> /etc/ntp/step-tickers echo "1.uk.pool.ntp.org" >> /etc/ntp/step-tickers service ntpd start /sbin/hwclock --systohc vsleep 5 ## Enabled Nested Virtualization... grep -i "vhv.allow" /etc/vmware/config || echo "vhv.allow = \"TRUE\"" >> /etc/vmware/config ## Rename the default "datastore" vim-cmd hostsvc/datastore/rename datastore1 "$(hostname -s)_local" ## Enable SSH and the Local Console vim-cmd hostsvc/enable_ssh vim-cmd hostsvc/start_ssh vim-cmd hostsvc/enable_esx_shell vim-cmd hostsvc/start_esx_shell # Suppress Shell Warning in Host esxcli system settings advanced set -o /UserVars/SuppressShellWarning -i 1 esxcli system settings advanced set -o /UserVars/ESXiShellTimeOut -i 1 /bin/cat > /etc/banner.new <