Image Customizer configuration
The Image Customizer is configured using a YAML (or JSON) file.
Top-level
The top level type for the YAML file is the config type.
Operation ordering
- 
    If partitions were specified in the config, customize the disk partitions. Otherwise, if the resetPartitionsUuidsType value is specified, then the partitions’ UUIDs are changed. 
- 
    Override the /etc/resolv.conffile with the version from the host OS.
- 
    Update packages: - 
        Remove packages (removeLists, remove) 
- 
        Update base image packages (updateExistingPackages). 
- 
        Install packages (installLists, install) 
- 
        Update packages (updateLists, update) 
 
- 
        
- 
    Update hostname. (hostname) 
- 
    Add/update users. (users) 
- 
    Copy additional directories. (additionalDirs) 
- 
    Copy additional files. (additionalFiles) 
- 
    Enable/disable services. (services) 
- 
    Configure kernel modules. (modules) 
- 
    Write the /etc/image-customizer-releasefile.
- 
    Write the image history file. 
- 
    If the bootloader resetType is set to hard-reset, then reset the boot-loader.If the bootloader resetType is not set, then append the extraCommandLine value to the existing grub.cfgfile.
- 
    Update the SELinux mode. mode 
- 
    If (overlays) are specified, then add the overlay driver and update the fstab file with the overlay mount information. 
- 
    If a (verity) device is specified, then add the dm-verity dracut driver and update the grub config. 
- 
    Regenerate the initramfs file (if needed). 
- 
    Run (postCustomization) scripts. 
- 
    Restore the /etc/resolv.conffile.
- 
    If SELinux is enabled, call setfiles.
- 
    Run finalize image scripts. (finalizeCustomization) 
- 
    If --output-image-formatiscosi, then shrink the file systems.
- 
    If a (verity) device is specified, then create the hash tree and update the grub config. 
- 
    If the output format is set to isoorpxe, copy additional iso media files. (iso or pxe)
/etc/resolv.conf
The /etc/resolv.conf file is overridden during customization so that the package
installation and customization scripts can have access to the network.
Near the end of customization, the /etc/resolv.conf file is restored to its original
state.
However, if the /etc/resolv.conf did not exist in the base image and
systemd-resolved service is enabled, then the /etc/resolv.conf file is symlinked to
the /run/systemd/resolve/stub-resolv.conf file. (This would happen anyway during
first-boot. But doing this during customization is useful for verity enabled images
where the filesystem is readonly.)
If you want to explicitly set the /etc/resolv.conf file contents, you can do so within
a finalizeCustomization script, since those scripts run
after the /etc/resolv.conf is deleted.
Replacing packages
If you wish to replace a package with conflicting package, then you can remove the existing package using remove and then install the new package with install.
Example:
os:
  packages:
    remove:
    - kernel
    install:
    - kernel-uvm
Schema Overview
- config type
    - input (input type)
- storage
- iso (iso type)
- pxe (pxe type)
- os (os type)
        - bootloader (bootloader type)
- hostname
- kernelCommandLine (kernelCommandLine type)
- packages (packages type)
- additionalFiles (additionalFile type)
- additionalDirs (dirConfig type)
- groups (group type)
- users (user type)
- selinux (selinux type)
- services (selinux type)
- modules (module type)
- overlays (overlay type)
- uki (uki type)
- imageHistory
 
- scripts (scripts type)
- previewFeatures type
- output (output type)