Providing autoinstall configuration

There are two ways to provide the autoinstall configuration:

  • #cloud-config user data containing autoinstall: configuration directives for cloud-init

  • Directly on the installation media

For detailed how-to guides that provide step-by-step instructions on how to use these two methods, go to:

Autoinstall by way of cloud-config

The suggested way of providing autoinstall configuration to the Ubuntu installer is via cloud-init. This allows the configuration to be applied to the installer without having to modify the installation media.

The autoinstall configuration is provided via cloud-init configuration, which is almost endlessly flexible. In most scenarios the easiest way will be to provide user data via the NoCloud data source.

When providing autoinstall via cloud-init, the autoinstall configuration is provided as Cloud config data. This means it requires a #cloud-config header. The autoinstall directives are placed under a top level autoinstall: key:

#cloud-config
autoinstall:
    version: 1
    ....

Note

Cloud config data files must contain the #cloud-config header to be recognised as a valid cloud configuration data file.

Autoinstall on the installation media

Another option for supplying autoinstall to the Ubuntu installer is to place a file named autoinstall.yaml on the installation media itself.

The autoinstall configuration provided in this way is passed to the Ubuntu installer directly and does not require the top-level autoinstall: key:

version: 1
....

Starting in 24.04 (Noble), to be consistent with the cloud-config based format, a top-level autoinstall: keyword is allowed:

autoinstall:
    version: 1
    ....

There are two locations that Subiquity checks for the autoinstall.yaml file:

  • At the root of the installation medium. When writing the installation ISO to a USB flash drive, copy autoinstall.yaml to the partition containing the contents of the ISO - i.e. to the directory containing the casper sub-directory.

  • On the root file system of the installation system - this option typically requires modifying the installation ISO and is not recommended.

Alternatively, you can pass the location of the autoinstall file on the kernel command line via the subiquity.autoinstallpath parameter, where the path is relative to the root directory of the installation system. For example:

subiquity.autoinstallpath=path/to/autoinstall.yaml`

Order of precedence for autoinstall locations

Because there are many ways to specify the autoinstall file, it may happen that multiple locations are specified at the same time. Subiquity searches for the autoinstall file in the following order and uses the first existing one:

  1. Kernel command line

  2. Root of the installation system

  3. cloud-config

  4. Root of the installation medium (ISO)