baber
Expert
Expert

Why postscripts does not work in KS file due install ESXi

I want install my esxi with KS file follow is my KS file . All steps work complete just post scripts not work such as :

 

# Accept the VMware End User License Agreement
vmaccepteula

# Set the root password for the DCUI and Tech Support Mode
rootpw --iscrypted $1$i16Z0f91$.HABZ3nA0Q3RkGnIa9ILu.

# Install on the first local disk available on machine
install --firstdisk=local --overwritevmfs

# Set the network to DHCP on the first network adapter
network --bootproto=static --device=vmnic0 --ip=10.10.10.10 --netmask=255.255.255.0 --gateway=10.10.10.1 --hostname=SHOST --nameserver=10.10.10.40

#License
serialnum --esx=xxx-xxxx-xxxx-xxxx-xxxx
keyboard 'US Default'
#Reboot after installation
reboot --noeject
%firstboot --interpreter=busybox
sleep 30
#Enable and start SSH
vim-cmd hostsvc/enable_ssh
vim-cmd hostsvc/start_ssh
sleep 30
reboot

 

 only this part not work :

#Enable and start SSH
vim-cmd hostsvc/enable_ssh
vim-cmd hostsvc/start_ssh

what is the problem ?

Please mark helpful or correct if my answer resolved your issue.
0 Kudos
1 Reply
baber
Expert
Expert

Can anyone help me about it ?

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