From b6076131967667bf948b5960be5b29cf893610a1 Mon Sep 17 00:00:00 2001 From: jeburks2 <102697223+jeburks2@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:11:43 -0700 Subject: [PATCH] Update containers.rst to include QEMU multiarch Update containers.rst Update containers.rst Signed-off-by: Josh Burks --- userdocs/contents/containers.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/userdocs/contents/containers.rst b/userdocs/contents/containers.rst index aa8385eb..2b89205d 100644 --- a/userdocs/contents/containers.rst +++ b/userdocs/contents/containers.rst @@ -379,3 +379,32 @@ It is possible to duplicate an installed image by using : # wwctl container copy CONTAINER_NAME DUPLICATED_CONTAINER_NAME This kind of duplication can be useful if you are looking for canary tests. + +Multi-arch container management +============================ +It is possible to build, edit, and provision containers of different +architectures (i.e. aarch64) from an x86_64 host by using QEMU. Simply +run the appropriate command below based on your container management tools. + +.. code-block:: console + + # sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + # sudo podman run --rm --privileged multiarch/qemu-user-static --reset -p yes + # sudo singularity run docker://multiarch/qemu-user-static --reset -p yes + +Then, ``wwctl container exec`` will work regardless of the architecture of the container. +For more information about QEMU, see their `GitHub `_ + +To use wwclient on a booted container using a different architecture, +wwclient must be compiled for the specific architecture. This requires GOLang build +tools 1.21 or newer. Below is an example for building wwclient for arm64: + +.. code-block:: console + + # git clone https://github.com/warewulf/warewulf + # cd warewulf + # GOARCH=arm64 PREFIX=/ make wwclient + # mkdir -p /var/lib/warewulf/overlays/wwclient_arm64/rootfs/warewulf + # cp wwclient /var/lib/warewulf/overlays/wwclient_arm64/rootfs/warewulf + +Then, apply the new "wwclient_arm64" system overlay to your arm64 node/profile