1 Reply Latest reply on Aug 6, 2019 9:04 AM by MartinGustafsson

    Kickstart File Help

    dursok Lurker

      Relatively new to using kickstart scripts to automating the install of ESXi. Below I've pasted a very simple kickstart script as an example. I during the install process, the first half functions perfectly fine. Installs ESXi while setting a root password and starting a reboot. Problem I am having is the Stage 2 won't initiate and do more detailed configuration post installation. I assume I have a syntax issue wrong somewhere so if anyone can assist I would greatly apprecaite it.

       

      ### Custom ESXi kickstart file ###

       

      ### Stage 1 - Pre Installation

       

          # Accept VMware EULA

          accepteula

       

          #Set password

          rootpw Password

       

          # Select Disk Install

          install --firstdisk --overwritevmfs

       

          #Keyboard

          #keyboard 'US Default'

       

          #Initiate Firstboot

          %firstboot --interpreter=busybox

       

          #Delay Rebooting

          sleep 30

         

          #Reboot ESXi Host

          reboot

       

      ### Stage 2 - Post Installation

       

          #Add All NICs to vSwitch0

          esxcli network vswitch standard uplink add --uplink-name=vmnic1 --vswitch-name=vSwitch0

       

          #Networking Commands

          network --bootproto=dhcp

          esxcli network vswitch standard portgroup set -p "Management Network" -v 3310

         

          #Enable and Start SSH

          vim-cmd hostsvc/enable_ssh

          vim-cmd hostsvc/start_ssh

       

          #Enable and Start Shell

          vim-cmd hostsvc/enable_esx_shell

          vim-cmd hostsvc/start_esx_shell

       

          #Supress ESXi Shell shell warning

          esxcli system settings advanced set -o /UserVars/SuppressShellWarning -i 1

       

          #Disable IPv6 Support

          esxcli network ip set --ipv6-enabled=false

       

          #Reboot ESXi Host

          reboot

        • 1. Re: Kickstart File Help
          MartinGustafsson Hot Shot
          vExpertVMware Employees

          Hi Dursok,

           

          I edited your kickstart file and tried it in my lab and it works.

           

          ### Custom ESXi kickstart file ###

          ### Stage 1 - Pre Installation

          # Accept VMware EULA

          vmaccepteula

           

          # Select Disk Install

          install --firstdisk --overwritevmfs

           

          #Set password

          rootpw VMware1!

           

          #Reboot

          reboot

           

          ### Stage 2 - Post Installation

          #Initiate Firstboot

          %firstboot --interpreter=busybox

          sleep 30

           

          #Enter Maintenance mode

          vim-cmd hostsvc/maintenance_mode_enter

           

          #Add vmnic1 to vSwitch0

          esxcli network vswitch standard uplink add --uplink-name=vmnic1 --vswitch-name=vSwitch0

           

          #Set VLAN on Management Network

          esxcli network vswitch standard portgroup set -p "Management Network" -v 3310

           

          #Host Management Network Settings

          network --bootproto=dhcp --device=vmnic0

           

          #Enable and Start SSH

          vim-cmd hostsvc/enable_ssh

          vim-cmd hostsvc/start_ssh

           

          #Enable and Start Shell

          vim-cmd hostsvc/enable_esx_shell

          vim-cmd hostsvc/start_esx_shell

           

          #Supress ESXi Shell shell warning

          esxcli system settings advanced set -o /UserVars/SuppressShellWarning -i 1

           

          #Disable IPv6 Support

          esxcli network ip set --ipv6-enabled=false

           

          #Reboot ESXi Host

          reboot