Nicolas Massé 5 years ago
parent
commit
d03c938abd
  1. 23
      vsphere/itix-ks.cfg

23
vsphere/itix-ks.cfg

@ -22,11 +22,8 @@ reboot --noeject
# Register vCenter License # Register vCenter License
#serialnum --esx=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX #serialnum --esx=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
# Specifies script to run after ESXi is installed and before reboot # Specifies script to run after ESXi is installed on first boot
%post --interpreter=busybox --ignorefailure=true %firstboot --interpreter=busybox
# 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
# Enable TSM & SSH # Enable TSM & SSH
vim-cmd hostsvc/enable_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 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 echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFW62WJXI1ZCMfNA4w0dMpL0fsldhbEfULNGIUB0nQui nmasse@redhat.com" >> /etc/ssh/keys-root/authorized_keys
# enable firewall # Enable NTP
esxcli network firewall set --default-action false --enabled yes esxcli system ntp set -s pool.ntp.org
esxcli system ntp set -e 1
# 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"

Loading…
Cancel
Save