Closed jomeier closed 1 month ago
Can you try adding a custom script instead? https://github.com/suse-edge/edge-image-builder/blob/main/docs/building-images.md#custom You can (ab)use the script to be executed before the RKE2 installation one to do those changes. Something like 40-custom-containerd-config.sh where it creates the folder and the file:
#!/bin/bash
mkdir -p /var/lib/rancher/rke2/agent/etc/containerd
cat << EOF > /var/lib/rancher/rke2/agent/etc/containerd/config.toml.tmpl
<your content>
EOF
chmod 644 /var/lib/rancher/rke2/agent/etc/containerd/config.toml.tmpl
(I didn't tested this, consider this as 'pseudo-code')
@e-minguez He already said he tried to use a custom script.
@jomeier Please try to mount /var
before storing the file and unmounting it after (via umount /var
) in your custom script. The issue is /var isn't mounted by default during combustion. Related: https://github.com/suse-edge/edge-image-builder/issues/526
@e-minguez He already said he tried to use a custom script.
@jomeier Please try to
mount /var
before storing the file and unmounting it after (viaumount /var
) in your custom script. The issue is /var isn't mounted by default during combustion. Related: #526
Yes that worked! I didn't mount /var but got no error message while writing to it :D Thanks a lot!
Hi,
I desperately try to get a custom
file in the directory
before the rke2 installation scripts starts.
I tried to use a custom script. In that I created the path /var/lib/rancher/rke2/agent/etc/containerd before and copied the config.toml.tmpl file in that directory.
My second method was to create a folder and config file:
After all that methods the config.toml.tmpl file is still missing in the /var/lib/rancher/rke2/agent/etc/containerd directory after the first boot.
How can I do that?
I need that config change for containerd to get CDI with Kubevirt running on block devices.
Thanks a lot for your assistance, Josef