You can quickly deploy ESXi hosts using scripted, unattended installations or upgrades. Scripted installations, upgrades, or migrations provide an efficient way to deploy multiple hosts.
The installation or upgrade script contains the installation settings for ESXi. You can apply the script to all hosts that you want to have a similar configuration.
The installation or upgrade script can reside in one of the following locations:
- FTP
- HTTP/HTTPS
- NFS
- USB flash drive
- CDROM
Enter Boot Options to Start an Installation or Upgrade Script
You can start an installation or upgrade script by typing boot command-line options at the boot command line.
At boot time you might need to specify options to access the kickstart file.
Procedure
- You can enter boot options by pressing Shift+O in the boot loader.
- For a PXE boot installation, you can pass options through the kernelopts line of the boot.cfg file.
- At the runweasel command prompt, type ks=location of installation script plus boot command line options
- Example: ks=http://192.168.0.10/kickstart/ks_test.cfg nameserver=192.168.0.100 ip=192.168.0.210 netmask=255.255.255.0 gateway=192.168.0.254
The ESXi installer includes a default installation script that performs a standard installation to the first detected disk.
The default ks.cfg installation script is located in the initial RAM disk at /etc/vmware/weasel/ks.cfg. You can specify the location of the default ks.cfg file with the ks=file://etc/vmware/weasel/ks.cfg boot option
To get an idea how things work without writing installation script etc. Try installing a (virtual) ESXi host with the default ks.cfg installation script. At the weasel prompt, type:
ks=file://etc/vmware/weasel/ks.cfg
Kernel Options
The boot loader configuration file boot.cfg specifies
- The kernel
- The kernel options
- The boot modules that the mboot.c32 boot loader uses in an ESXi installation.
The boot.cfg file is provided in the ESXi installer. You can modify the kernelopt line of the boot.cfg file to specify the location of an installation script or to pass other boot options.
This is useful while:
- Creating an Installation .ISO with a custom installation or upgrade script;
- Working with PXE booting the ESXi installer, using PXELINUX and a PXE or isolinux.cfg PXE configuration file.
Boot.cfg
The commands in boot.cfg configure the boot loader.