Prepare user images

Prepare user imagesΒΆ

Ironic understands two types of user images that include:

  • Whole disk image

    Image of complete operating system with the partition table and partitions

  • Partition image

    Image of root partition only, without the partition table. Such images must have appropriate kernel and initramfs images associated with them.

    The partition images can be deployed using one of the following methods:

    • netboot (default)

      The node is PXE-booted over network to kernel and ramdisk over TFTP.

    • local boot

      During a deployment, the image is modified on a disk to boot from a local disk. See Ironic Advanced features for details.

User images are deployed in a non-virtualized environment on real hardware servers. Therefore, they require all necessary drivers for a given bare metal server hardware to be included, that are disks, NICs, and so on.

Note

This section provides example instructions on how to prepare the required images using the diskimage-builder tool. The steps may differ depending on your specific needs and the builder tool. For more information, see the Create and add images to the Image service.

To prepare whole disk images:

Use standard cloud images as whole disk images if they contain all necessary drivers. Otherwise, rebuild a cloud image by typing:

diskimage-create <base system> -p <EXTRA_PACKAGE_TO_INSTALL> [-p ..]

To prepare partition images for netboot:

  1. Use the images from UEC cloud images that have kernel and initramfs as separate images if they contain all the required drivers.

  2. If additional drivers are required, rebuild the standard whole disk cloud image adding the packages as follows:

    diskimage-create <BASE_SYSTEM>> baremetal -p <EXTRA_PACKAGE_TO_INSTALL> [-p ..]
    
  3. Upload images to Glance in the following formats:

    • For an aki image for kernel, type:

      glance image-create --name <IMAGE_NAME> \
           --disk-format aki \
           --container-format aki \
           --file <PATH_TO_IMAGE_KERNEL>
      
    • For an ari image for initramfs, type:

      glance image-create --name <IMAGE_NAME> \
           --disk-format ari \
           --container-format ari \
           --file <PATH_TO_IMAGE_INITRAMFS>
      
    • For a rootfs or whole disk image in the output format (qcow2 by default) specified during rebuild, type:

      glance image-create --name <IMAGE_NAME> \
           --disk-format <'QCOW2'_FROM_THE_ABOVE_COMMAND> \
           --container-format <'BARE'_FROM_THE_ABOVE_COMMAND> \
           --kernel-id <UUID_OF_UPLOADED_AKI_IMAGE> \
           --ramdisk-id <UUID_OF_UPLOADED_ARI_IMAGE> \
           --file <PATH_TO_IMAGE_KERNEL>
      

      Note

      For rootfs images, set the kernel_id and ramdisk_id image properties to UUIDs of the uploaded aki and ari images respectively.

To prepare partition images for local boot:

  1. Use the images from UEC cloud images that have kernel and initramfs as separate images if they contain all the required drivers.

  2. If additional drivers are required, rebuild the standard whole disk cloud image adding the packages as follows:

    Caution

    Verify that the base operating system has the grub2 package available for installation. And enable it during the rebuild as illustrated in the command below.

    diskimage-create <BASE_SYSTEM> baremetal grub2 -p <EXTRA_PACKAGE_TO_INSTALL> [-p ..]