VMware Cloud Community
baber
Expert
Expert

Why my postcommands not work with kickstart after install ESXi

I want to install ESXi 7 with KS file my ks file is such as bellow. unfortunately none of commands work after

%firstboot --interpreter=busybox

 

What is the problem ?

 

# Sample scripted installation file
# Accept the VMware End User License Agreement
vmaccepteula
# Set the root password for the DCUI and ESXi Shell
rootpw P@ssw0rd
# Install on the first local disk available on machine
install --firstdisk --overwritevmfs
# Set the network to DHCP on the first network adapater, use the specified hostname and do not create a portgroup for the VMs
network --bootproto=static --device=vmnic0 --ip=10.40.80.50 --netmask=255.255.255.0 --gateway=10.40.80.1 --nameserver=172.20.100.100 --hostname=Lhost8
# reboots the host after the scripted installation is completed

 

%firstboot --interpreter=busybox
sleep 30

#esxcli network ip interface ipv4 set --interface-name=vmk0 --ipv4=10.40.80.50 --netmask=255.255.255.0 --type=static
# Add vMotion Portgroup to vSwitch0, assign it VLAN ID 5 and create a VMkernel interface
# Enable vMotion on the newly created VMkernel vmk1
# Add new vSwitch for VM traffic, assign uplinks, create a portgroup and assign a VLAN ID
# Set DNS and hostname
esxcli system hostname set --fqdn=lhost8.lab.vm
esxcli network ip dns search add --domain=lab.vm
esxcli network ip dns server add --server=172.20.100.100
esxcli network ip dns server add --server=172.20.100.101
# Set the default PSP for EMC V-MAX to Round Robin as that is our preferred load balancing mechanism
#esxcli storage nmp satp set --default-psp VMW_PSP_RR --satp VMW_SATP_SYMM
# Enable SSH and the ESXi Shell
vim-cmd hostsvc/enable_ssh
vim-cmd hostsvc/start_ssh
vim-cmd hostsvc/enable_esx_shell
vim-cmd hostsvc/start_esx_shell
reboot

 

Please mark helpful or correct if my answer resolved your issue.
Reply
0 Kudos
0 Replies