|
|
|
@ -22,11 +22,8 @@ reboot --noeject |
|
|
|
# Register vCenter License |
|
|
|
#serialnum --esx=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX |
|
|
|
|
|
|
|
# Specifies script to run after ESXi is installed and before reboot |
|
|
|
%post --interpreter=busybox --ignorefailure=true |
|
|
|
|
|
|
|
# Enable HV (Hardware Virtualization to run nested 64bit Guests + Hyper-V VM |
|
|
|
grep -i "vhv.enable" /etc/vmware/config || echo "vhv.enable = \"TRUE\"" >> /etc/vmware/config |
|
|
|
# Specifies script to run after ESXi is installed on first boot |
|
|
|
%firstboot --interpreter=busybox |
|
|
|
|
|
|
|
# Enable TSM & SSH |
|
|
|
vim-cmd hostsvc/enable_ssh |
|
|
|
@ -41,16 +38,6 @@ esxcli system settings advanced set -o /UserVars/SuppressShellWarning -i 1 |
|
|
|
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPR1tt58X0+vbvsCR12gMAqr+g7vjt1Fx/qqz9EiboIs nicolas.masse@itix.fr" >> /etc/ssh/keys-root/authorized_keys |
|
|
|
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFW62WJXI1ZCMfNA4w0dMpL0fsldhbEfULNGIUB0nQui nmasse@redhat.com" >> /etc/ssh/keys-root/authorized_keys |
|
|
|
|
|
|
|
# enable firewall |
|
|
|
esxcli network firewall set --default-action false --enabled yes |
|
|
|
|
|
|
|
# Services Firewall to enable by default |
|
|
|
for svc in syslog sshClient ntpClient updateManager httpClient netdump |
|
|
|
do |
|
|
|
esxcli network firewall ruleset set --ruleset-id ${svc} --enabled yes |
|
|
|
done |
|
|
|
|
|
|
|
# backup ESXi configuration to persist changes |
|
|
|
/sbin/auto-backup.sh |
|
|
|
|
|
|
|
esxcli system shutdown reboot -d 60 -r "rebooting after host configurations" |
|
|
|
# Enable NTP |
|
|
|
esxcli system ntp set -s pool.ntp.org |
|
|
|
esxcli system ntp set -e 1 |
|
|
|
|