diff --git a/src/runtime-rs/config/configuration-cloud-hypervisor.toml.in b/src/runtime-rs/config/configuration-cloud-hypervisor.toml.in index 836c893b4c..7eac48c100 100644 --- a/src/runtime-rs/config/configuration-cloud-hypervisor.toml.in +++ b/src/runtime-rs/config/configuration-cloud-hypervisor.toml.in @@ -214,6 +214,23 @@ block_device_driver = "virtio-blk-pci" # but it will not abort container execution. #guest_hook_path = "/usr/share/oci/hooks" +# Enable swap in the guest. Default false. +# When enable_guest_swap is enabled, insert a raw file to the guest as the swap device. +#enable_guest_swap = true + +# If enable_guest_swap is enabled, the swap device will be created in the guest +# at this path. Default "/run/kata-containers/swap". +#guest_swap_path = "/run/kata-containers/swap" + +# The percentage of the total memory to be used as swap device. +# Default 100. +#guest_swap_size_percent = 100 + +# The threshold in seconds to create swap device in the guest. +# Kata will wait guest_swap_create_threshold_secs seconds before creating swap device. +# Default 60. +#guest_swap_create_threshold_secs = 60 + [agent.@PROJECT_TYPE@] container_pipe_size=@PIPESIZE@ # If enabled, make the agent display debug-level messages. diff --git a/src/runtime-rs/config/configuration-dragonball.toml.in b/src/runtime-rs/config/configuration-dragonball.toml.in index c5e44188d7..fba747d4d3 100644 --- a/src/runtime-rs/config/configuration-dragonball.toml.in +++ b/src/runtime-rs/config/configuration-dragonball.toml.in @@ -217,6 +217,23 @@ virtio_fs_cache = "@DEFVIRTIOFSCACHE@" # result in memory pre allocation #enable_hugepages = true +# Enable swap in the guest. Default false. +# When enable_guest_swap is enabled, insert a raw file to the guest as the swap device. +#enable_guest_swap = true + +# If enable_guest_swap is enabled, the swap device will be created in the guest +# at this path. Default "/run/kata-containers/swap". +#guest_swap_path = "/run/kata-containers/swap" + +# The percentage of the total memory to be used as swap device. +# Default 100. +#guest_swap_size_percent = 100 + +# The threshold in seconds to create swap device in the guest. +# Kata will wait guest_swap_create_threshold_secs seconds before creating swap device. +# Default 60. +#guest_swap_create_threshold_secs = 60 + [agent.@PROJECT_TYPE@] container_pipe_size=@PIPESIZE@ # If enabled, make the agent display debug-level messages. diff --git a/src/runtime-rs/config/configuration-qemu-runtime-rs.toml.in b/src/runtime-rs/config/configuration-qemu-runtime-rs.toml.in index 9854a00cae..f8959ba91f 100644 --- a/src/runtime-rs/config/configuration-qemu-runtime-rs.toml.in +++ b/src/runtime-rs/config/configuration-qemu-runtime-rs.toml.in @@ -470,17 +470,6 @@ valid_entropy_sources = @DEFVALIDENTROPYSOURCES@ # See: https://www.qemu.org/docs/master/qemu-qmp-ref.html#Dump-guest-memory for details #guest_memory_dump_paging=false -# Enable swap in the guest. Default false. -# When enable_guest_swap is enabled, insert a raw file to the guest as the swap device -# if the swappiness of a container (set by annotation "io.katacontainers.container.resource.swappiness") -# is bigger than 0. -# The size of the swap device should be -# swap_in_bytes (set by annotation "io.katacontainers.container.resource.swap_in_bytes") - memory_limit_in_bytes. -# If swap_in_bytes is not set, the size should be memory_limit_in_bytes. -# If swap_in_bytes and memory_limit_in_bytes is not set, the size should -# be default_memory. -#enable_guest_swap = true - # use legacy serial for guest console if available and implemented for architecture. Default false #use_legacy_serial = true