@@ -21,14 +21,8 @@ REGISTRY_CONFIG_FILE="${REGISTRY_CONFIG_PATH}/registries.yaml"
2121init_arch () {
2222 ARCH=$( uname -m)
2323 case $ARCH in
24- armv5* ) ARCH=" armv5" ;;
25- armv6* ) ARCH=" armv6" ;;
26- armv7* ) ARCH=" arm" ;;
2724 aarch64) ARCH=" arm64" ;;
28- x86) ARCH=" 386" ;;
2925 x86_64) ARCH=" amd64" ;;
30- i686) ARCH=" 386" ;;
31- i386) ARCH=" 386" ;;
3226 esac
3327}
3428
@@ -187,9 +181,9 @@ function install_crun_runtime {
187181 echo -e " \\ 033[32m---> crun runtime install completed!\\ 033[0m"
188182}
189183
190- # install_kata_runtime downloads and installs the Kata Containers runtime with Cloud Hypervisor VMM.
191- # CLH (Cloud Hypervisor) is used instead of QEMU , providing lower memory overhead and faster startup.
192- # sandbox_cgroup_only is set to true for complete resource tracking and cgroups v2 support .
184+ # install_kata_runtime downloads and installs the Kata Containers runtime-rs with Dragonball VMM.
185+ # Dragonball is the built-in VMM for runtime-rs , providing lowest memory overhead and fastest startup.
186+ # static_sandbox_resource_mgmt is enabled by default in the Dragonball configuration template .
193187# Requires PodOverhead configured in the RuntimeClass (see install_k3s_server).
194188function install_kata_runtime {
195189 echo -e " \\ 033[32m---> Start install kata runtime\\ 033[0m"
@@ -205,16 +199,13 @@ function install_kata_runtime {
205199
206200 curl -fL " ${kata_download_url} " -o ${kata_package}
207201 tar -I zstd -xf ${kata_package} -C /
208- cp /opt/kata/share/defaults/kata-containers/runtime-rs/configuration-clh-runtime-rs.toml \
202+ # configure kata runtime for Dragonball VMM
203+ cp /opt/kata/share/defaults/kata-containers/runtime-rs/configuration-dragonball.toml \
209204 /opt/kata/share/defaults/kata-containers/runtime-rs/configuration.toml
210- sed -i ' s/sandbox_cgroup_only=false/sandbox_cgroup_only=true/g' \
211- /opt/kata/share/defaults/kata-containers/runtime-rs/configuration.toml
212- sed -i ' s/static_sandbox_resource_mgmt=false/static_sandbox_resource_mgmt=true/g' \
213- /opt/kata/share/defaults/kata-containers/runtime-rs/configuration.toml
214- sed -i ' s/^default_vcpus = .*/default_vcpus = 1/' \
215- /opt/kata/share/defaults/kata-containers/runtime-rs/configuration.toml
216- sed -i ' s/^default_maxvcpus = .*/default_maxvcpus = 32/' \
217- /opt/kata/share/defaults/kata-containers/runtime-rs/configuration.toml
205+ # enable static_sandbox_resource_mgmt for Dragonball VMM
206+ sed -i ' s/static_sandbox_resource_mgmt = false/static_sandbox_resource_mgmt = true/g' \
207+ /opt/kata/share/defaults/kata-containers/runtime-rs/configuration.toml
208+ # create symlinks for containerd to find the kata runtime binaries
218209 ln -sf /opt/kata/runtime-rs/bin/containerd-shim-kata-v2 /usr/local/bin/containerd-shim-kata-v2
219210 ln -sf /opt/kata/runtime-rs/bin/kata-runtime /usr/local/bin/kata-runtime
220211 rm -rf ${kata_package}
@@ -246,12 +237,12 @@ EOF
246237 if [[ " ${containerd_runtimes[n]} " == " kata" ]]; then
247238 install_kata_runtime
248239 cat << EOF >> "${CONTAINERD_CONFIG_FILE} "
249- [plugins.cri.containerd.runtimes.kata]
240+ [plugins.'io.containerd. cri.v1.runtime' .containerd.runtimes.kata]
250241 runtime_type = "io.containerd.kata.v2"
251242 privileged_without_host_devices = true
252243 pod_annotations = ["io.katacontainers.*"]
253244 container_annotations = ["io.katacontainers.*"]
254- [plugins." io.containerd.grpc .v1.cri" .containerd.runtimes.kata.options]
245+ [plugins.' io.containerd.cri .v1.runtime' .containerd.runtimes.kata.options]
255246 ConfigPath = "/opt/kata/share/defaults/kata-containers/runtime-rs/configuration.toml"
256247EOF
257248 elif [[ " ${containerd_runtimes[n]} " == " crun" ]]; then
0 commit comments