From 938447803b64a6118aae1e4b1a31fd81d8593757 Mon Sep 17 00:00:00 2001 From: Yohei Ueda Date: Thu, 6 Apr 2023 16:53:05 +0900 Subject: [PATCH] runtime: Use static resource in remote hypervisor This patch updates the template configuration file for the remote hypervisor to set static_sandbox_resource_mgmt to be true. The remote hypervisor uses the peer pod config to determine the sandbox size, so requires this to be set to true by default. Fixes: #6616 Signed-off-by: Yohei Ueda --- src/runtime/config/configuration-remote.toml.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/runtime/config/configuration-remote.toml.in b/src/runtime/config/configuration-remote.toml.in index d04f1896ff..e2b3810257 100644 --- a/src/runtime/config/configuration-remote.toml.in +++ b/src/runtime/config/configuration-remote.toml.in @@ -244,6 +244,16 @@ disable_new_netns = true # See: https://pkg.go.dev/github.com/kata-containers/kata-containers/src/runtime/virtcontainers#ContainerType sandbox_cgroup_only=@DEFSANDBOXCGROUPONLY@ +# If enabled, the runtime will attempt to determine appropriate sandbox size (memory, CPU) before booting the virtual machine. In +# this case, the runtime will not dynamically update the amount of memory and CPU in the virtual machine. This is generally helpful +# when a hardware architecture or hypervisor solutions is utilized which does not support CPU and/or memory hotplug. +# Compatibility for determining appropriate sandbox (VM) size: +# - When running with pods, sandbox sizing information will only be available if using Kubernetes >= 1.23 and containerd >= 1.6. CRI-O +# does not yet support sandbox sizing annotations. +# - When running single containers using a tool like ctr, container sizing information will be available. +# Note: the remote hypervisor uses the peer pod config to determine the sandbox size, so requires this to be set to true +static_sandbox_resource_mgmt=true + # VFIO Mode # Determines how VFIO devices should be be presented to the container. # Options: