To modify the default installation or upgrade script or to create your own script, use supported commands. Use supported commands in the installation script, which you specify with a boot command when you boot the installer.

To determine which disk to install or upgrade ESXi on, the installation script requires one of the following commands: install, upgrade, or installorupgrade. The install command creates the default partitions, including a VMFS datastore that occupies all available space after the other partitions are created. The install command replaces the autopart command that was used for scripted ESXi 4.1 installations.

accepteula or vmaccepteula (required)

Accepts the ESXi license agreement. This command functions as it did in ESXi 4.1.

clearpart (optional)

Compared to kickstart, the behavior of the ESXi clearpart command is different. Carefully edit the clearpart command in your existing scripts.

Clears any existing partitions on the disk. Requires install command to be specified.

--drives=

Remove partitions on the specified drives.

--alldrives

Ignores the --drives= requirement and allows clearing of partitions on every drive.

--ignoredrives=

Removes partitions on all drives except those specified. Required unless the --drives= or --alldrives flag is specified.

--overwritevmfs

Permits overwriting of VMFS partitions on the specified drives. By default, overwriting VMFS partitions is not allowed.

--firstdisk=

disk-type1

[disk-type2,...]

Partitions the first eligible disk found. By default, the eligible disks are set to the following order:

  1. Locally attached storage (local)

  2. Network storage (remote)

  3. USB disks (usb)

You can change the order of the disks by using a comma separated list appended to the argument. If you provide a filter list, the default settings are overridden. You can combine filters to specify a particular disk, including esx for the first disk with ESX installed on it, model and vendor information, or the name of the vmkernel device driver. For example, to prefer a disk with the model name ST3120814A and any disk that uses the mptsas driver rather than a normal local disk, the argument is --firstdisk=ST3120814A,mptsas,local.

dryrun (optional)

Parses and checks the installation script. Does not perform the installation.

install

Specifies that this is a fresh installation. Replaces the deprecated autopart command used for ESXi 4.1 scripted installations. Either the install, upgrade, or installorupgrade command is required to determine which disk to install or upgrade ESXi on.

--disk= or --drive=

Specifies the disk to partition. In the command --disk=diskname, the diskname can be in any of the forms shown in the following examples:

  • Path: --disk=/vmfs/devices/disks/mpx.vmhba1:C0:T0:L0

  • MPX name: --disk=mpx.vmhba1:C0:T0:L0

  • VML name: --disk=vml.000000034211234

  • vmkLUN UID: --disk=vmkLUN_UID

For accepted disk name formats, see Disk Device Names.

--firstdisk=

disk-type1,

[disk-type2,...]

Partitions the first eligible disk found. By default, the eligible disks are set to the following order:

  1. Locally attached storage (local)

  2. Network storage (remote)

  3. USB disks (usb)

You can change the order of the disks by using a comma separated list appended to the argument. If you provide a filter list, the default settings are overridden. You can combine filters to specify a particular disk, including esx for the first disk with ESX installed on it, model and vendor information, or the name of the vmkernel device driver. For example, to prefer a disk with the model name ST3120814A and any disk that uses the mptsas driver rather than a normal local disk, the argument is --firstdisk=ST3120814A,mptsas,local.

--ignoressd

Excludes solid-state disks (S--firstdiskSDs) from eligibility for partitioning. This option can be used with the install command and the --firstdisk option. This option takes precedence over the --firstdisk option. This option is invalid with the --drive or --disk options and with the upgrade and installorupgrade commands. See the vSphere Storage documentation for more information about preventing SSD formatting during auto-partitioning.

--overwritevsan

You must use the --overwritevsan option when you install ESXi on a disk, either SSD or HDD (magnetic), that is in a Virtual SAN disk group. If you use this option and there is no Virtual SAN partition on the selected disk, the installation will fail. When you install ESXi on a disk that is in Virtual SAN disk group, the result depends on the disk you select:

  • If you select an SSD, the SSD and all underlying HDDs in the same disk group will be wiped.

  • If you select an HDD, and the disk group size is greater than two, only the selected HDD will be wiped.

  • If you select an HDD disk, and the disk group size is two or less, the SSD and the selected HDD will be wiped.

For more information about managing Virtual SAN disk groups, see the vSphere Storage documentation.

--overwritevmfs

Required to overwrite an existing VMFS datastore on the disk before installation.

--preservevmfs

Preserves an existing VMFS datastore on the disk during installation.

--novmfsondisk

Prevents a VMFS partition from being created on this disk. Must be used with --overwritevmfs if a VMFS partition already exists on the disk.

installorupgrade

Either the install, upgrade, or installorupgrade command is required to determine which disk to install or upgrade ESXi on.

--disk= or --drive=

Specifies the disk to partition. In the command --disk=diskname, the diskname can be in any of the forms shown in the following examples:

  • Path: --disk=/vmfs/devices/disks/mpx.vmhba1:C0:T0:L0

  • MPX name: --disk=mpx.vmhba1:C0:T0:L0

  • VML name: --disk=vml.000000034211234

  • vmkLUN UID: --disk=vmkLUN_UID

For accepted disk name formats, see Disk Device Names.

--firstdisk=

disk-type1,

[disk-type2,...]

Partitions the first eligible disk found. By default, the eligible disks are set to the following order:

  1. Locally attached storage (local)

  2. Network storage (remote)

  3. USB disks (usb)

You can change the order of the disks by using a comma separated list appended to the argument. If you provide a filter list, the default settings are overridden. You can combine filters to specify a particular disk, including esx for the first disk with ESX installed on it, model and vendor information, or the name of the vmkernel device driver. For example, to prefer a disk with the model name ST3120814A and any disk that uses the mptsas driver rather than a normal local disk, the argument is --firstdisk=ST3120814A,mptsas,local.

--overwritevsan

You must use the --overwritevsan option when you install ESXi on a disk, either SSD or HDD (magnetic), that is in a Virtual SAN disk group. If you use this option and there is no Virtual SAN partition on the selected disk, the installation will fail. When you install ESXi on a disk that is in Virtual SAN disk group, the result depends on the disk you select:

  • If you select an SSD, the SSD and all underlying HDDs in the same disk group will be wiped.

  • If you select an HDD, and the disk group size is greater than two, only the selected HDD will be wiped.

  • If you select an HDD disk, and the disk group size is two or less, the SSD and the selected HDD will be wiped.

For more information about managing Virtual SAN disk groups, see the vSphere Storage documentation.

--overwritevmfs

Install ESXi if a VMFS partition exists on the disk, but no ESX or ESXi installation exists. Unless this option is present, the installer will fail if a VMFS partition exists on the disk, but no ESX or ESXi installation exists.

--forcemigrate

If a version 4.x host contains customizations, such as third-party VIBS or drivers, that are not included in the installer .ISO, the installer exits with an error describing the problem. The forcemigrate option overrides the error and forces the upgrade.

If you are upgrading a 5.0.x host, supported custom VIBs on the host that are not included in the ESXi installer ISO are migrated. If the host or the installer .ISO contains a VIB that creates a conflict and prevents the upgrade, an error message identifies the offending VIB. You can remove the VIB and retry the upgrade, or use ESXI Image Builder to create a custom installer .ISO that resolves the conflict. The forcemigrate option is not available.

See vSphere Upgrade for information about upgrading hosts that have third-party custom VIBs.

Caution:

Using the forcemigrate option might cause the upgraded host to not boot properly, to exhibit system instability, or to lose functionality.

keyboard (optional)

Sets the keyboard type for the system.

keyboardType

Specifies the keyboard map for the selected keyboard type. keyboardType must be one of the following types.

  • Belgian

  • Brazilian

  • Croatian

  • Czechoslovakian

  • Danish

  • Default

  • Estonian

  • Finnish

  • French

  • German

  • Greek

  • Icelandic

  • Italian

  • Japanese

  • Latin American

  • Norwegian

  • Polish

  • Portuguese

  • Russian

  • Slovenian

  • Spanish

  • Swedish

  • Swiss French

  • Swiss German

  • Turkish

  • US Dvorak

  • Ukrainian

  • United Kingdom

serialnum or vmserialnum (optional)

Deprecated in ESXi 5.0.x. Supported in ESXi 5.1. Configures licensing. If not included, ESXi installs in evaluation mode.

--esx=<license-key>

Specifies the vSphere license key to use. The format is 5 five-character groups (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX).

network (optional)

Specify a network address for the system.

--bootproto=[dhcp|static]

Specify whether to obtain the network settings from DHCP or set them manually.

--device=

Specifies either the MAC address of the network card or the device name, in the form vmnicNN, as in vmnic0. This options refers to the uplink device for the virtual switch.

--ip=

Sets an IP address for the machine to be installed, in the form xxx.xxx.xxx.xxx. Required with the --bootproto=static option and ignored otherwise.

--gateway=

Designates the default gateway as an IP address, in the form xxx.xxx.xxx.xxx. Used with the --bootproto=static option.

--nameserver=

Designates the primary name server as an IP address. Used with the --bootproto=static option. Omit this option if you do not intend to use DNS.

The --nameserver option can accept two IP addresses. For example: --nameserver="10.126.87.104[,10.126.87.120]"

--netmask=

Specifies the subnet mask for the installed system, in the form 255.xxx.xxx.xxx. Used with the --bootproto=static option.

--hostname=

Specifies the host name for the installed system.

--vlanid= vlanid

Specifies which VLAN the system is on. Used with either the --bootproto=dhcp or --bootproto=static option. Set to an integer from 1 to 4096.

--addvmportgroup=(0|1)

Specifies whether to add the VM Network port group, which is used by virtual machines. The default value is 1.

paranoid (optional)

Causes warning messages to interrupt the installation. If you omit this command, warning messages are logged.

part or partition (optional)

Creates an additional VMFS datastore on the system. Only one datastore per disk can be created. Cannot be used on the same disk as the install command. Only one partition can be specified per disk and it can only be a VMFS partition

datastore name

Specifies where the partition is to be mounted

--ondisk= or --ondrive=

Specifies the disk or drive where the partition is created.

--firstdisk=

disk-type1,

[disk-type2,...]

Partitions the first eligible disk found. By default, the eligible disks are set to the following order:

  1. Locally attached storage (local)

  2. Network storage (remote)

  3. USB disks (usb)

You can change the order of the disks by using a comma separated list appended to the argument. If you provide a filter list, the default settings are overridden. You can combine filters to specify a particular disk, including esx for the first disk with ESX installed on it, model and vendor information, or the name of the vmkernel device driver. For example, to prefer a disk with the model name ST3120814A and any disk that uses the mptsas driver rather than a normal local disk, the argument is --firstdisk=ST3120814A,mptsas,local.

reboot (optional)

Reboots the machine after the scripted installation is complete.

<--noeject>

The CD is not ejected after the installation.

rootpw (required)

Sets the root password for the system.

--iscrypted

Specifies that the password is encrypted.

password

Specifies the password value.

upgrade

Either the install, upgrade, or installorupgrade command is required to determine which disk to install or upgrade ESXi on.

--disk= or --drive=

Specifies the disk to partition. In the command --disk=diskname, the diskname can be in any of the forms shown in the following examples:

  • Path: --disk=/vmfs/devices/disks/mpx.vmhba1:C0:T0:L0

  • MPX name: --disk=mpx.vmhba1:C0:T0:L0

  • VML name: --disk=vml.000000034211234

  • vmkLUN UID:--disk=vmkLUN_UID

For accepted disk name formats, see Disk Device Names.

--firstdisk=

disk-type1,

[disk-type2,...]

Partitions the first eligible disk found. By default, the eligible disks are set to the following order:

  1. Locally attached storage (local)

  2. Network storage (remote)

  3. USB disks (usb)

You can change the order of the disks by using a comma separated list appended to the argument. If you provide a filter list, the default settings are overridden. You can combine filters to specify a particular disk, including esx for the first disk with ESX installed on it, model and vendor information, or the name of the vmkernel device driver. For example, to prefer a disk with the model name ST3120814A and any disk that uses the mptsas driver rather than a normal local disk, the argument is --firstdisk=ST3120814A,mptsas,local.

--deletecosvmdk

If the system is being upgraded from ESX, remove the directory that contains the old Service Console VMDK file, cos.vmdk, to reclaim unused space in the VMFS datastore.

--forcemigrate

If an ESX/ESXi 4.x host contains customizations, such as third-party VIBS or drivers, that are not included in the installer .ISO, the installer exits with an error describing the problem. The forcemigrate option overrides the error and forces the upgrade. If you are upgrading a 5.0.x host, supported custom VIBs that are not included in the ESXi installer ISO are migrated. You do not need to use the forcemigrate option.

See the vSphere Upgrade documentation for imformation about upgrading hosts that have third-party custom VIBs.

Caution:

Using the forcemigrate option might cause the upgraded host to not boot properly, to exhibit system instability, or to lose functionality.

%include or include (optional)

Specifies another installation script to parse. This command is treated similarly to a multiline command, but takes only one argument.

filename

For example: %include part.cfg

%pre (optional)

Specifies a script to run before the kickstart configuration is evaluated. For example, you can use it to generate files for the kickstart file to include.

--interpreter

=[python|busybox]

Specifies an interpreter to use. The default is busybox.

%post (optional)

Runs the specified script after package installation is complete. If you specify multiple %post sections, they run in the order that they appear in the installation script.

--interpreter

=[python|busybox]

Specifies an interpreter to use. The default is busybox.

--timeout=secs

Specifies a timeout for running the script. If the script is not finished when the timeout expires, the script is forcefully terminated.

--ignorefailure

=[true|false]

If true, the installation is considered a success even if the %post script terminated with an error.

%firstboot

Creates an init script that runs only during the first boot. The script has no effect on subsequent boots. If multiple %firstboot sections are specified, they run in the order that they appear in the kickstart file.

Note:

You cannot check the semantics of %firstboot scripts until the system is booting for the first time. A %firstboot script might contain potentially catastrophic errors that are not exposed until after the installation is complete.

--interpreter

=[python|busybox]

Specifies an interpreter to use. The default is busybox.

Note:

You cannot check the semantics of the %firstboot script until the system boots for the first time. If the script contains errors, they are not exposed until after the installation is complete.