diskimage-builder Release Notes

3.36.0-3

Bug Fixes

  • Fixes an issue where an image using the manifest element could fail to build when using a non-root user. See bug 2069956.

3.36.0

Upgrade Notes

  • The vm element is no longer included dependency of the rocky-container, almalinux-container and fedora-container elements. You will need to update your build configuration to include this element if you still wish to create partitioned disk based images.

3.34.0

New Features

  • Adds the ability for diskimage-builder to create images with different block sizes. By default, this remains at the default of 512 bytes, but some newer devices require 4096 bytes to be used, which impacts the overall layout rendering 512 byte images incompatible. This setting can also be asserted and overridden using the DIB_BLOCK_SIZE environment variable, but alternatively exists as a new block_size parameter for local_loop section in block device YAML documents.

  • A new element autoupdates is added to DIB. This element, with proper configuration, will enable and configure cloud images to have a system that automatically updates the image, from the upstream binaries. To this end, DIB_DEB_UPDATES_CONF or DIB_YUM_UPDATES_CONF must be set during build time.

  • Adds the ability to disable serial console logging from being setup in the bootloader element by setting the DIB_BOOTLOADER_USE_SERIAL_CONSOLE environment variable to False.

  • Adds logic to permit the removal of consoles when the bootloader element when no configuration has been expressed which requests it, and serial console is disabled. This involves DIB_BOOTLOADER_VIRTUAL_TERMINAL being set to an empty string and DIB_BOOTLOADER_USE_SERIAL_CONSOLE is set to False.

  • The new element replace-partition has been added which allows a diskimage-builder built image to be used as the base image so that it can be copied to a new partition layout. This allows the content to be copied from one image to a new one without making any package changes. The element replace-partition-redhat has a documented example for redhat family images.

Upgrade Notes

  • It is no longer possible to build images using CentOS 7 or RHEL 7 as a base image as these reached EOL on 30th June 2024. The centos and centos-minimal elements now default to a DIB_RELEASE value of 9-stream.

  • DIB_GRUB_TIMEOUT defaulting to 1 second, GRUB_TIMEOUT was duplicated in the /etc/defaults/grub the original intension of DIB_GRUB_TIMEOUT default was to match the typical image default which is one 1 second instead of 5 second today.

Bug Fixes

  • The bootloader element now strips prior explicit console settings from the /etc/default/grub file, in order to prevent accidential re-introduction of prior settings when grub configuration is manually updated later.

  • The default release for the centos element is now “9-stream” instead of “8”. This is a result of Centos8 having reached End of Life.

Other Notes

  • The autoupdates element has only been tested in Rocky and Ubuntu images. In addition, the element does not check the validity of the configuration files in any way.

3.33.0

Bug Fixes

  • Fixes an issue where if an operator set a cloud-init data source to ConfigDrive, the host might not properly configure as automatic metadata collection still attempts to operate. We now disable that by default, when ConfigDrive is passed as an argument.

3.32.0

New Features

  • A new fail2ban element has been added which has has been tested on Debian and Rocky images. The usage of a new variable DIB_FAIL2BAN_CONF is now mandatory during built time.

  • The bootloader element will explicitly set the timeout style to hidden to hide the menu. Set DIB_GRUB_TIMEOUT_STYLE to menu to display the menu and then wait for the timeout expire before booting the default entry.

Bug Fixes

  • Use of the simple-init element now removes cloud-init, in order to prevent the two tools from clashing when booting a workload.

Other Notes

  • Added a DIB_DEBIAN_CLOUD_INIT_HELPER variable that controls whether debian element will attempt to pre-create required users and sudoers file for the default cloud-init user. This should not be needed for any modern Debian distro.

  • Value of DIB_DEBIAN_ALT_INIT_PACKAGE has been switched to systemd-sysv for Debian releases older then Jessie. If you still need to build a version of Debian that is relying on sysvinit please override the DIB_DEBIAN_ALT_INIT_PACKAGE variable for that.

3.31.0

New Features

  • The usage of the DIB_CHECKSUM variable is extended. Now to be more specific the variable can be set to the sha256 or md5 value to generate only one checksum file. There also can be provided a comma-separated list of the values, but only sha256 and md5 supported. For backward compatibility using DIB_CHECKSUM=1 or option --checksum in the command line still can be used to generate all supported checksums.

Deprecation Notes

  • The deploy-baremetal, deploy-kexec, deploy-tgtadm, and deploy-targetcli elements are deprecated and will be removed in a future release of diskimage-builder. The origins of the elemenets largely dates back to the early efforts to support baremetal deployment, and the methods have been long ago moved away from.

Bug Fixes

  • As NetworkManager can’t automatically create default connection profiles for InfiniBand interfaces, we are adding nm-dhcp-ib-interfaces element to install NetworkManager-system-connections-infiniband.nmconnection to NetworkManager to create a wildcard InfiniBand connection profile.

3.30.0

New Features

  • Added environment variable REG_SAT_REPO to the rhel-common element. Sets the repository label for Satellite client tools.

  • The bootloader element now has variable DIB_BOOTLOADER_VIRTUAL_TERMINAL to customize or suppress the console=tty0 kernel argument.

Bug Fixes

  • The Satellite Client reposotories replaces the Satellite Tools repository since Satellite 6.11. The default repo labels in the rhel-common element has been updated to reflect this change. See Red Hat Satellite 6.11 Release Notes.

    To enable users that need to use the legacy Satellite Tools repository, the REG_SAT_REPO environment variable has been added to enable manual override of the Satellite repository.

3.28.0

New Features

  • Adds a fips element which attempts to enable FIPS mode configuration into the disk image being created.

  • A new command diskimage-builder is now provided (also aliased to dib). It provides a YAML file based interface to disk-image-create and ramdisk-image-create. All arguments can be specified as yaml dictionary entries, along with environment variable overrides which are applied over the provided environment.

  • Adds swap as a valid “filesystem” for block devices

Bug Fixes

  • Fixed the ubuntu-minimal target to also run autoremove at the end of an image build.

  • Fixes a possible case with a FIPS enabled disk image where the cryptographic policies may be applied for enforcement of FIPS mode, but the underlying kernel command line may be missing. This in particular was discovered when testing on Rocky Linux. We now test, and add the FIPS kernel command line flag if it is otherwise enabled.

  • Fixes the GRUB2 bootloader kernel command line where a prior boot parameter could cause issues with bootloader configuration when an image is rebuilt and the bootloader element is utilized. We now remove any prior boot parameter in /etc/default/grub when executing the bootloader element, and then assert a valid entry boot parameter if a /boot partition is defined as part of the image build.

3.26.0

Upgrade Notes

  • The default networking in the containerfile element is switched to host as we have found that more reliable in generating the initial chroot images.

3.25.0

New Features

  • Added ELRepo element.

  • Allow processing ‘jammy’ ubuntu release in lvm

3.24.0

New Features

  • LVM thin provisioning is now supported in the block device lvs node. Thin pools can be defined and thin volumes associated with those pools.

3.23.0

New Features

  • Upgrade openEuler element from 20.03-LTS-SP2 to 22.03-LTS.

Other Notes

  • The block device lvm lvs size attribute was passed directly to lvcreate, so using units M, G means base 2. All other block device size values are parsed with accepted conventions of M, B being base 10 and MiB, GiB being base 2. lvm lvs size attributes are now parsed the same as other size attributes. This improves consistency and makes it practical to calculate volume sizes to fill the partition size. This means existing size values will now create slightly smaller volumes. Previous sizes can be restored by changing the unit to MiB, GiB, or increasing the value for a base 10 unit.

    Requested sizes will also be rounded down to align with physical extents (4MiB).

3.21.0

Known Issues

  • The dhcp-all-interfaces element attempts to work with “predictable interface names”. During boot the name of the interfaces is changed from ethX to the new scheme, for example enpXsX; depending on the Linux kernel this move may be captured by udev as an “add” or “move” event. The dhcp-all-interfaces udev rule has been updated to match against both possible events. If you prefer to not use predictable names your image builds can set DIB_BOOTLOADER_DEFAULT_CMDLINE with net.ifnames=0 or mask the default policy with ln -s /dev/null /etc/systemd/network/99-default.link. This process is documented by systemd: https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

    Note that this update reverts previous changes to disable predictable interface names completely when using dhcp-all-interfaces. Predictable device names were disabled in an effort to make dhcp-all-interfaces function on Debian Bullseye, but this broke any users that wished to use predictable device names. Instaed we make predictable device names work on Debian Bullseye and allow users to disable predictable device names should they choose to.

3.19.0

New Features

  • It is now possible to configure the dhcp-all-interfaces element not to install the dhcp-all-interfaces service on systems with NetworkManager.

    NetworkManager is quite capable to do automatic interface configuration. NetworkManager will by default try to auto-configure any interface with no configuration, it will use DHCP for IPv4 and Router Advertisements to decide how to initialize IPv6.

    The new environment variable DIB_DHCP_NETWORK_MANAGER_AUTO (defauls to: false) has been added, when set to true only the configuration for NetworkManager is written.

Deprecation Notes

  • References to building i386 images have been removed.

Bug Fixes

  • The dhcp-all-interfaces element does not work correctly with the new “predictable names” scheme for network interfaces. During boot the name of the interfaces is changed from ethX to the new scheme, for example enpXsX; this name change is not detected by udev de facto making the udev rule of the dhcp-all-interfaces element useless; this causes the machine booted with the image including the dhcp-all-interfaces element to not get any ip and so being unreachable from the network. This patch includes a workaround to fallback to the “persistent names” scheme allowing the dhcp-all-interfaces element to work again as intended.

3.18.0

Bug Fixes

  • Added a note about a known issue with debootstrap versions when building the ubuntu-minimal element and added a reference to where exactly to find the DIB_RELEASE variable.

3.17.0

Upgrade Notes

  • Bumped the default Ubuntu release to focal.

  • Bumped the default openSUSE Leap release to 15.3 for the opensuse element.

Deprecation Notes

  • Dropped support for building openSUSE Leap 42.1, 42.2, 42.3, 15.0, 15.1, and 15.2, since all of them have already reached end-of-life.

Bug Fixes

  • An issue causing bootloader installation to fail on EFI system was fixed. grub2 could not find the neccecary files, adding the grub2-efi-x64-modules package to the pkg-map for centos-9 in the grub2 element fixes the issue. See bug: 1957169.

3.15.1

Bug Fixes

  • This release fixes an regression in the containerfile element that prevented it extracting root images correctly.

3.14.0

New Features

  • Add openeuler-minimal element. OpenEuler is an open source community driven YUM/DNF distro like Fedora. For more info about openEuler, see: https://openeuler.org/en.

  • A custom yum repository can now be configured by defining DIB_YUM_REPO_PACKAGE as a yum available package or a URL to an rpm file. This package can install repo files with any associated keys and certificates.

  • Now, users of the yum-minimal element can specify additional packages to install while creating the initial chroot by setting DIB_YUM_MINIMAL_BOOTSTRAP_PACKAGES. This can be useful for adding support for new linux distributions that use yum.

Upgrade Notes

  • This includes updates to allow yum-minimal elements to work on host platforms that only supply DNF (e.g. Debian Bullseye). Note the dnf download plugin is required on these platforms.

3.13.0

New Features

  • Element block-device-efi-lvm has been added which is like block-device-efi but defines an LVM logical group in the root partition. Four logical volumes are defined in that group, mounted to /, /tmp, /var, and /home.

    This volume layout will not meet all requirements, but this is more of an example demonstrating the capability to encourage more usage of this existing feature.

Upgrade Notes

  • Base installs now mount /sys read-only in chroot environemnts. This is a good indication to various tools and scripts that that they are running in a unprivileged/containerised environment.

3.12.0

Deprecation Notes

  • Removed support for extlinux and grub (as opposed to grub2) support from the bootloader element.

3.8.0

New Features

  • Add aarch64 support for ‘’rhel’’.

3.7.0

Upgrade Notes

  • Removes the long deprecated ironic-agent element. Use ironic-python-agent-ramdisk from the ironic-python-agent-builder project.

3.4.0

New Features

  • The centos element supports CentOS 8 Stream builds when run with DIB_RELEASE=8-stream

  • Add support to run dhclient on vlan interfaces created on top of an Ethernet interface. The vlan interfaces in this case will use the default naming convention of <interface>.<vlan>. See also <https://storyboard.openstack.org/#!/story/2008298>`__ for further details.

  • New environment variable enables the ability to select specific module streams prior to RPM installation on RHEL8 and later.

Upgrade Notes

  • cloud-init-disable-resizefs will no longer leave growpart on / partition to enabled in cloud.cfg.

3.3.1

Bug Fixes

  • Fixes an issue with duplicate element files building Debian images.

3.3.0

Upgrade Notes

  • The DIB_ADD_APT_KEYS argument now copies keys into /etc/apt/trusted.gpg.d, rather than using apt-key to add them.

Bug Fixes

  • rhel element fixes trying to install python3 before registering subscriptions.

3.2.0

New Features

  • The centos-minimal supports CentOS 8 Stream builds when run with DIB_RELEASE=8-stream

  • The bootloader element now co-installs a BIOS bootloader for x86-64 when DIB_BLOCK_DEVICE=efi is set. This makes images that are EFI and BIOS cross-compatiable.

  • The default for elements building Fedora is updated to Fedora 32

Deprecation Notes

  • The dib-python element is deprecated. In chroot Python tools should use #!/usrbin/env python3 on all distributions now.

Bug Fixes

  • Fix cases of ‘mkfs’ failing because the partitions never showed up. Partition mappings will now be updated instead of just adding them with ‘kpartx’. That means that ‘kpartx’ will also remove devmappings for deleted partitions.

  • Fixes support for the dhcp-all-interfaces element when the system networking configuration is managed via NetworkManager.

  • Fixes NetworkManager configuration with the dhcp-all-interfaces element to account for Centos8/RHEL8’s default change to the NetworkManager internal DHCP client, which can introduce different behavior for infrastucture operators such as those using LACP.

3.1.0

New Features

  • This removes automatic detection and activation of virtualenv environments, which is no longer necessary. This fixes installation under Python 3’s inbuilt venv module.

2.38.0

Critical Issues

  • This is the last release of diskimage-builder to support Python 2

2.37.0

New Features

  • The package-installs element can now take a list value for the when environment filter.

  • The ubuntu-minimal element now supports the Focal release.

2.36.0

Upgrade Notes

  • The pip-and-virtualenv element does not support Fedora 31 (and greater) or Tumbleweed distributions.

Deprecation Notes

  • Trusty testing has been removed; although we have not attempted to disable support in elements, the distribution can be effectively considered deprecated from this release.

2.34.0

New Features

  • Added CentOS 8 support.

  • The ensure-venv module is added to ensure that python3 -m venv is available on the host. This can be useful if you wish to install non-distribution-packaged Python software on a host during build, but not mix any non-distro installation. This works on all platforms with Python 3 available.

Upgrade Notes

  • Adds efibootmgr and efivar packages to ironic-agent, so when building DIB images they will be present.

Deprecation Notes

  • The centos7 element is deprecated and is left only for backward compatibility. Use the centos element instead. Note that you should set DIB_RELEASE to 7 when using the centos element.

2.31.0

Bug Fixes

  • The dhcp-all-interfaces element could not configure network interfaces properly when rdisc6 is present on the system

2.30.0

Deprecation Notes

  • The dib-init-system element installs a utility /usr/local/bin/dib-init-system which would try to guess the init system (systemd, etc.). This was called from environment.d files, which means that in phases outside the chroot it was attempting to query the init system of the build host. This completely fails in a situation such as running inside a container without a full init system. To avoid this issue, each OS element will set DIB_INIT_SYSTEM directly. The dib-init-system script was not really intended to be called directly, but will now just report the value of DIB_INIT_SYSTEM.

2.29.0

New Features

  • A new variable DIB_DEBIAN_SECURITY_SUBPATH is added to override the suite subpath of security repositories. Previously this was hard-coded to the upstream repository layout, which may not always match the mirror’s layout.

Deprecation Notes

  • The “ironic-agent” element can now be found at ironic-python-agent-builder to build the ramdisk. This element is deprecated from diskimage-builder.

Bug Fixes

  • The pip-and-virtualenv element also installs python3-venv on Python-3 Debian-like distributions to ensure $DIB_PYTHON_VIRTUALENV works as expected.

  • The sysprep element has been fixed to truncate /var/lib/dpkg/machine-id (/etc/machine-id was already being truncated). This ensures a machine-id is not packaged in the image and systemd will be forced to generate a new one upon first boot.

  • The sysprep element is added as a dependency to the debootstrap element to ensure that it runs on all Debian builds, including debian-minimal based images.

2.28.1

Deprecation Notes

  • The DIB_SIMPLE_INIT_NETWORKMANAGER_IPV6_DELAY variable is removed as it turned out that increasing this delay increased the odds that NetworkManager would fail to configure IPv6 on an interface. Instead, glean has been updated to not up interfaces and relies on NetworkManager to do this. This results in reliable IPv4 and IPv6 config.

2.28.0

New Features

  • The centos-minimal supports CentOS 8 builds when run with DIB_RELEASE=8

  • A new variable DIB_DEBIAN_SECURITY_MIRROR is added to override the path to the security repositories. Previously this was hard-coded to the upstream repositories, which could get out of sync with mirrors specified with DIB_DISTRIBUTION_MIRROR.

  • The pip-and-virtualenv element has added variables DIB_PYTHON_PIP and DIB_PYTHON_VIRTUALENV to make it more straight forward for other elements to install packages or create virtualenv environment

Upgrade Notes

  • The simple-init element will now default to using NetworkManager for CentOS and Fedora platforms. For CentOS 8 and Fedora, the DIB_SIMPLE_INIT_NETWORKMANAGER=0 option is no longer supported.

Deprecation Notes

  • Source install for pip-and-virtualenv is deprecated for RHEL 8/CentOS 8

2.27.0

New Features

  • The DIB_GZIP_BIN environment variable enables builders to change the path to gzip, such as when an alternate gzip is to be used (ie. pigz).

Bug Fixes

  • The yum-minimal element now removes the linux-firmware and linux-firmware-whence packages to save space in cloud images.

2.26.0

New Features

  • The journal-to-console element is added to allow forwarding systemd output to the host console. This is useful for debugging early boot issues.

Bug Fixes

  • When using the block-device-efi element to create an EFI based system (most notably, with ARM64), the final disk size is now expanded for the 512MiB system EFI partition introduced with 2.24.0

  • The DIB_SIMPLE_INIT_NETWORKMANAGER_IPV6_DELAY variable is added for the simple-init element to set the net.ipv6.conf.default.router_solicition_delay sysctl setting (it defaults to 30s). If you are seeing an extra “blank” interface in nmcli con show it is likely that NM has not correctly configured itself in the presence of an interface already configured with IPV6 by the kernel. Increasing this value may help work-around the problem.

2.25.0

New Features

  • Added an environment variable, DIB_UBUNTU_KERNEL, that allows you to specify the kernel meta package to install in the image. It currently supports “linux-image-generic” (The default), “linux-image-kvm”, and “linux-image-virtual”.

2.24.0

New Features

  • Adds a new element rhel to handle all supported RHEL releases, which are currently ‘7’ and ‘8’. As of now, users of diskimage-builder will still be able to use the ‘rhel7’ element, or migrate to ‘rhel’ and specify their respective DIB_RELEASE value.

Upgrade Notes

  • The opensuse and opensuse-minimal element are now defaulting to build 15.1. Building for 42.3 and 15.0 is still supported, however requires setting DIB_RELEASE to ‘42.3’ resp. ‘15.0’ explicitly.

Deprecation Notes

  • Support in opensuse and opensuse-minimal for openSUSE 42.2 has been removed as these are end of life.

  • The rhel7 element is deprecated and is left only for backwards compatibility. Use the rhel element instead. Note that you should set DIB_RELEASE to 7 to indicate which release you are using. Please read the notes.

Bug Fixes

  • The size of the ESP partition when building EFI based images is increased considerably from 12MiB to 550MiB, in line with modern guidelines. The existing size was often not enough to update packages.

2.23.0

New Features

  • The --image-extra-size option is provided to override the default 60% padding growth of the image size with a fixed gigabyte value.

  • The --mkfs-journal-size option is added to override the default journal size for basic ext4 root partitions.

Upgrade Notes

  • The --image-extra-size argument has changed from gigabytes to megabytes to make it more practical for use on smaller images.

  • The opensuse and opensuse-minimal element are now defaulting to build 15.0. Building for 42.2 and 42.3 is still supported, however requires setting DIB_RELEASE to ‘42.3’ resp. ‘42.2’ explicitly.

Deprecation Notes

  • Support in opensuse and opensuse-minimal for openSUSE 13.* has been removed as these are end of life.

Security Issues

  • a new post-install script was added in openssh-server element to ensure KexAlgorithms, Ciphers and MACs for sshd_config will be configured following good pratices on https://infosec.mozilla.org/guidelines/openssh. This option is activated by default, users can set DIB_OPENSSH_SERVER_HARDENING to 0 to disable this sshd configuration

2.19.0

New Features

  • Adds a new element init-ibft-interfaces to initialize network interfaces with configuration provided via iBFT. The new element is now a dependency of the ironic-agent element.

  • The simple-init element can now use NetworkManager instead of legacy scripts on Red Hat platforms.

  • The package-installs element now supports skipping installation of packages based on an environment variable specified in the config file. See the package-installs element documentation for full details.

Other Notes

  • Setting values with the selinux-permissive element has been moved from install.d to pre-install.d phase to avoid selinux related packages being installed before the settings are applied.

2.18.0

New Features

  • Setting --logfile will now imply DIB_QUIET=1 (i.e. logs will not appear on stdout). You can override this with an explicit DIB_QUIET=0 if you want stdout and file logging.

  • A post-root stage is added that runs outside the chroot and before the image size calculation. For example, this may be useful for running things that copy much data into the image and need to be outside of the chroot and after install stages which run inside the chroot.

  • A pre-finalise stage is added that runs outside the chroot and before the finalise stage. For example, this may be useful for mounting external resources that are used inside the chroot during the finalise stage, but do not need to be distributed in the final image such as build-time caches.

2.17.0

Other Notes

  • It has been clarified that the DIB_BOOTLOADER_DEFAULT_CMDLINE variable appends its values to grubs GRUB_CMDLINE_LINUX_DEFAULT, which is used during all normal boots but not rescue boots; as opposed to applying to GRUB_CMDLINE_LINUX

2.16.0

New Features

  • Add new modprobe element. This element will replace modprobe-blacklist element. It wil still have the blacklist functionality, but it also adds the feature of passing a complete file with settings to the modprobe.d directory. Adding this functionality, that will allow elements that depends on this module, to just copy the specified files to the final directory.

Upgrade Notes

  • You would need to modify your DIB_CLOUD_IMAGES and possibly SHA256SUMS variables if you were using them to build Ubuntu with elements/ubuntu: DIB_CLOUD_IMAGES would need to contain URL with path, and SHA256SUMS would not now neccesarily point to $DIB_RELEASE/current/ directory.

2.12.0

New Features

  • GPT support is added to the bootloader; see documentation for configuration examples. This should be considered a technology preview; there may be minor behaviour modifications as we enable UEFI and support across more architectures.

2.11.0

Bug Fixes

  • This fixes bug 1742170 where the grub root label is different than the file system label when booting from a whole disk image.

  • This fixes bug 1744403 where 60-ironic-agent-install fails to run when DIB_INSTALLTYPE_ironic_agent=source is set. pip installs constraints with the -c argument and this argument is a relatively newer addion. The currently installed pip may not support that option and must be upgraded before proceeding.

2.10.0

New Features

  • Adds sysprep element included by all systemd distros

  • A --logfile option is added to save output to a given file.

  • By default, all stdout will log with timestamps (this used to be inconsistent; python tools logged with a timestamp, and bash parts did not). If you set DIB_NO_TIMESTAMP to 1 the timestamp prefix will be suppressed (this would be appropriate if you are running diskimage-builder and capturing its output, and adding your own timestamp). Note that output to --logfile will always be timestamped.

  • You can set DIB_QUIET to 1 to suppress all output. This is likely only useful when used with the --logfile command.

Bug Fixes

  • Adds default sysprep element clearing /etc/machine-id which prevents duplicated /etc/machine-id by forcing systemd to generate a new id for each booted system.

2.9.0

New Features

  • Adds lvm support, allowing to create volumes.

Upgrade Notes

  • The fedora-minimal and fedora elements have been updated to default to Fedora 26. Note if you to pin to specific versions, be sure to specify DIB_RELEASE.

2.8.0

Upgrade Notes

  • The opensuse and opensuse-minimal element are now defaulting to 42.3, which is the latest stable openSUSE release. Building for 42.2 is still supported, however requires setting DIB_RELEASE to ‘42.2’ explicitly.

2.7.0

Deprecation Notes

  • The centos and rhel elements have been removed. These were building version 6 which is no longer supported (mostly due to a lack of python 2.7). Version 7 support is available via the centos7 and rhel7 elements (which downloads and modifies the upstream cloud images) or via centos-minimal (which builds the image from a empty chroot; only available for CentOS). centos-minimal is suggested as this is what OpenStack Infrastructure uses for its elements.

    Unfortunately, centos-minimal sets DISTRO=centos while centos7 sets DISTRO=centos7, despite building the same thing as far as upper levels are concerned. We plan to rectify this in the version 8 time-frame.

  • The DIB_[DISTRO]_DISTRIBUTION_MIRROR variables have been removed. These were undocumented ways to set DIB_DISTRIBUTION_MIRROR for some elements. It was not implemented consistently and causing some confusion. If you need to setup mirrors for testing purposes, the openstack-ci-mirrors element is a good example that is used by OpenStack gate testing.

2.6.0

Deprecation Notes

  • The dracut-network element has been removed. It has not been functioning for some time due to incorrect paths.

2.4.0

New Features

  • Adds mkfs, mount and fstab to the block device layer.

2.3.0

Deprecation Notes

  • The dib-run-parts element is no longer required as disk-image-create will directly source the internal version for running scripts within the chroot. This element was unintentionally leaving /usr/local/bin/dib-run-parts in the built image. From code search we do not believe anyone was relying on the presence of this script. If you do require it, you should source the dib-utils package to install.

  • dib no longer exports dib-run-parts. Adding this was an oversight made during v2 development, since dib-utils already provides this. The dib-run-parts used internally (diskimage_builder/lib/dib-run-parts) is not intended to be used by external tools. If you require dib-run-parts, you should install the dib-utils package.

Other Notes

  • The packages specified with the -p command-line operation are now installed after the install.d phase, not before. This is to give elements priority when installing packages. The flag documentation has been updated to describe this.

2.1.0

Bug Fixes

  • dib-init-system did not correctly find the init system for Debian Jessie and Debian Stretch. This version also looks for /bin/systemctl as as hint for systemd and fixes the problem.

2.0.0

Prelude

Version 2.0.0 of diskimage-builder incorporates recent work from the feature/v2 branch. This includes incorporating some largely internal changes to the way it finds and calls elements, enhancements to partitioning and removal of some long-deprecated elements. If you use dib exclusively via the command-line disk-image-create installed from a package or via pypi you are unlikely to notice any difference (if you run it directly from a git-tree checkout, you may be affected).

New Features

  • 2.0.0 includes a new framework for partitioning contributed by Andreas Florath. This should allow for creating multiple partitions, images with encryption, LVM support and flexibility for multiple-devices, all of which are currently not supported. Please check the v2 documentation, specs and reach out if these features interest you (some parts still in review).

  • Element override is now supported. If you have an element of the same name earlier in the ELEMENTS_PATH, it will override later instances (previously, the behaviour was undefined).

Upgrade Notes

  • For purposes of both users and development we want dib to be as “pythonic” as possible and behave like all other projects. Two major visible changes are:

    • command-line scripts are entry points (i.e. need to be installed)

    • elements have moved under diskimage_create module

    The result of the first is that ./bin/disk-image-create from the source tree is no longer there. Like all other projects, you should install dib into a virtualenv (if you’re developing, use pip -e) and disk-image-create will “just work”.

    The second change, moving the inbuilt elements under the diskimage_create module, is a simplification so we always have a canonical path to our elements. Since we now always know where elements are relative to the imported diskimage_builder module we can drop all the path guessing complexity. This has other good flow-on effects such as testr being able to find unit-tests for elements in the normal fashion and having imports work as usual.

    We are aware there are a number of tools that like to take dib elements and do things with them. Reading some of the dib source you may find there is a canonical way to find out the included dib elements path – ask dib itself, something like

    DIB_ELEMENTS=$(python -c '
    import diskimage_builder.paths;
    diskimage_builder.paths.show_path("elements")')
    

    Note you probably do not want this. As mentioned, another feature of v2 is override elements – an element that appears first in the element path-list will override any built-in one (just like $PATH). There is a function, diskimage_builder.get_elements(), which will correctly process the element path, calculate overrides and return a canonical list of elements, their dependencies and correct paths.

    That said, you probably do not want this either! There are a number of elements that do things on behalf of other elements – they look for a file in the included elements, say, and use that as a manifest for something. Previously, these would just have to make up their own element processing via inspection of the command-line arguments. dib now exports pre-computed variables that an element can walk for all the current build elements – a YAML list for easy python decoding and a function that builds an array for Bash elements.

Deprecation Notes

  • A number of long-deprecated elements have been removed in v2, which are to the best of our knowledge unused.

    • partitioning-sfdisk

    • deploy-ironic-element

    • ironc-discovered-ramdisk

    • serial-console-element

    • map-services

  • We have removed and deprecated the dib-utils package. This was intended to be a more generic repository of tools that might be useful outside dib, but that did not eventuate and it has been folded back into dib for simplicity.