1
0
mirror of https://github.com/kata-containers/kata-containers.git synced 2025-05-09 00:47:30 +00:00
kata-containers/tools/osbuilder/image-builder
Jianyong Wu 2b0d5b252e image_build: align image size to 128M for arm64
There is an inconformity between qemu and kernel of memory alignment
check in memory hotplug. Both of qemu and kernel will do the start
address alignment check in memory hotplug. But it's 2M in qemu
while 128M in kernel. It leads to an issue when memory hotplug.

Currently, the kata image is a nvdimm device, which will plug into the VM as
a dimm. If another dimm is pluged, it will reside on top of that nvdimm.
So, the start address of the second dimm may not pass the alginment
check in kernel if the nvdimm size doesn't align with 128M.

There are 3 ways to address this issue I think:
1. fix the alignment size in kernel according to qemu. I think people
in linux kernel community will not accept it.
2. do alignment check in qemu and force the start address of hotplug
in alignment with 128M, which means there maybe holes between memory blocks.
3. obey the rule in user end, which means fix it in kata.

I think the second one is the best, but I can't do that for some reason.
Thus, the last one is the choice here.

Fixes: 
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2021-05-03 10:44:30 +08:00
..
Dockerfile osbuilder: update dockerfiles to utilize IMAGE_REGISTRY 2021-04-02 09:46:16 -07:00
image_builder.sh image_build: align image size to 128M for arm64 2021-05-03 10:44:30 +08:00
nsdax.gpl.c osbuilder: move code into tools directory 2020-04-29 16:45:00 -05:00
README.md docs: fix markdown check issues 2020-04-29 17:51:44 -05:00

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