-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKS-TEMPLATE.CFG
52 lines (44 loc) · 2.15 KB
/
KS-TEMPLATE.CFG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
vmaccepteula
install --firstdisk --overwritevmfs --novmfsondisk
network --bootproto=static --ip=KSIPADDRESS --netmask=KSNETMASK --gateway=KSGATEWAY --hostname=KSHOSTNAME --vlanid=KSVLAN --nameserver=KSNAMESERVER
rootpw 1N@S31cr31t0!
keyboard US Default
reboot
%firstboot --interpreter=busybox
# Enable SSH
vim-cmd hostsvc/enable_ssh
vim-cmd hostsvc/start_ssh
# Enable ESXi Shell
vim-cmd hostsvc/enable_esx_shell
vim-cmd hostsvc/start_esx_shell
# Suppress Shell warning
esxcli system settings advanced set -o /UserVars/SuppressShellWarning -i 1
# NTP
esxcli system ntp set -s 0.sg.pool.ntp.org -s 1.sg.pool.ntp.org-s 2.sg.pool.ntp.org-s 3.sg.pool.ntp.org
esxcli system ntp set -e 1
## Create vSwitches
#esxcli network vswitch standard add -v vSwitch1
#esxcli network vswitch standard add -v vSwitch2
#
## Set vSwitch MTU's
#esxcli network vswitch standard set -v vSwitch1 -m 9000
#esxcli network vswitch standard set -v vSwitch2 -m 9000
#
## Add Additional NIC to vSwitches
#esxcli network vswitch standard uplink add --uplink-name=vmnic1 --vswitch-name=vSwitch0
#esxcli network vswitch standard uplink add --uplink-name=vmnic2 --vswitch-name=vSwitch1
#esxcli network vswitch standard uplink add --uplink-name=vmnic3 --vswitch-name=vSwitch1
#esxcli network vswitch standard uplink add --uplink-name=vmnic4 --vswitch-name=vSwitch2
#esxcli network vswitch standard uplink add --uplink-name=vmnic5 --vswitch-name=vSwitch2
#
## Create VMKernel Ports
#esxcli network vswitch standard portgroup add --portgroup-name=vMotion --vswitch-name=vSwitch1
#esxcli network vswitch standard portgroup add --portgroup-name=NFS --vswitch-name=vSwitch2
#esxcli network ip netstack add --netstack=vmotion
#esxcli network ip interface add --interface-name=vmk1 --portgroup-name=vMotion --netstack=vmotion --mtu=9000
#esxcli network ip interface add --interface-name=vmk2 --portgroup-name=NFS --mtu=9000
#esxcli network ip interface ipv4 set --interface-name=vmk1 --ipv4=192.168.10.215 --netmask=255.255.255.0 --type=static
#esxcli network ip interface ipv4 set --interface-name=vmk2 --ipv4=192.168.5.215 --netmask=255.255.255.0 --type=static
#
## Put host in maintenance mode
#esxcli system maintenanceMode set -e true