A Lab deployed using terraform
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

43 lines
1.9 KiB

# Accept the VMware License agreement
accepteula
# Clear all partitions in first detected disk and overwrite any VMFS partition
clearpart --firstdisk --overwritevmfs
# New installation on first disk and overwrite an existing VMFS datastore
install --firstdisk --overwritevmfs
# French keyboard
keyboard French
# Root password. Generated using "openssl passwd -1"
rootpw --iscrypted $1$7McSxAUG$3mAxHfGio8pRT1qHyKQTG. # P@ssw0rd!
# Use DHCP for the first NIC
network --bootproto=dhcp --device=vmnic0
# Reboot after installation
reboot --noeject
# Register vCenter License
#serialnum --esx=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
# Specifies script to run after ESXi is installed on first boot
%firstboot --interpreter=busybox
# Enable TSM & SSH
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
# inject SSH authorized keys (RSA keys only!)
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDK64XJZJIVf0G7lbPrVbe/ll39O1HNcMnkxbJCJ+k4aND/yiyYcUGBpjtYsfkX7ms2jVNFZ5S59tqeddqd2nzeL8R1vcC/CKxFhbCRL6mWkx3ANcsUhgFmdvjemCwcsDwAQQynh+MhhoCpFCU41mM0T9jT2TfuZx1Zt1ATNJeZ3epOfYvYntefu5LsLQ/8W2XDMtoCvgMLCWyiPZKqdpcOZKKDwB/Vat01T9oDV9h8B/SCA7YTm0Y4nJJnnJ3L+Bpt9R9nbjMZc0fe7EIyybbS7T+cleQ35L0oEaGN/sgrzlD+S4yXKFEof4Rv8d5wR1JBKHF+/VHpRMSJNB1VWpL5 nicolas.masse@itix.fr" >> /etc/ssh/keys-root/authorized_keys
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDa4sNbMV9sx00+8vjvJ0Qr8vZJ2BeezeaPEbsW9iHHuRZkYDKZKPxfZBuqU7J2aIZJ15Bufzn/jkGVZFkOSIN2FdY8wgxHXABHadp0aXsEbHcbFyBQCSk4oPvTR8HCevMWGAdSo5LoJe+jmVTUhKPb+k+mAj1kNKCavRLnw6x0ZtDaUh5QYaQkMW+wjGywfQQuM2kpilGaU7+aUYqzfvaj308ATTv3NMyzsB+woFOYn5RZhZuvEjDdTOaD/1ud5+WP+WSNOttA0IXfHDIiMo40MdIvZIZVz1bdc9Lu+I5ct/+MhPqC7k7L2cxBmDADOhxBNvGZTQSYxcO5ViTyGe+1 nmasse@redhat.com" >> /etc/ssh/keys-root/authorized_keys
# Enable NTP
esxcli system ntp set -s pool.ntp.org
esxcli system ntp set -e 1