mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-05-18 05:36:24 +00:00
The DAX header (2 MiB of NVDIMM metadata + a duplicate MBR) is unconditionally prepended to every image by set_dax_header(). NVIDIA images use virtio-blk-pci with disable_image_nvdimm=true, so the kernel reads MBR #1 directly and never touches the DAX metadata -- it is dead weight. Add a SKIP_DAX_HEADER environment variable (default "no") that, when set to "yes", skips the DAX header entirely: - Removes the 2 MiB DAX overhead from image size calculations in both the erofs and ext4 paths - Skips the set_dax_header() call, avoiding compilation and execution of the nsdax tool - Passes the variable through to containerised builds Enable SKIP_DAX_HEADER=yes for both install_image_nvidia_gpu() and install_image_nvidia_gpu_confidential() in the build pipeline. All other image builds are unaffected (default remains "no"). Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Kata Containers image generation
A Kata Containers disk image is generated using the image_builder.sh script.
This uses a rootfs directory created by the rootfs-builder/rootfs.sh script.
Creating a guest OS image
To create a guest OS image run:
$ sudo ./image_builder.sh path/to/rootfs
Where path/to/rootfs is the directory populated by rootfs.sh.
Note
: If you are building an image from an Alpine rootfs, see the important note here.
Further information
For more information about usage (including how to adjust the size of the image), run:
$ ./image_builder.sh -h