You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

459 lines
18 KiB

  1. # Copyright (c) 2017-2019 Intel Corporation
  2. #
  3. # SPDX-License-Identifier: Apache-2.0
  4. #
  5. # XXX: WARNING: this file is auto-generated.
  6. # XXX:
  7. # XXX: Source file: "cli/config/configuration-qemu.toml.in"
  8. # XXX: Project:
  9. # XXX: Name: Kata Containers
  10. # XXX: Type: kata
  11. [hypervisor.qemu]
  12. path = "/opt/kata/bin/qemu-system-x86_64"
  13. kernel = "/opt/kata/share/kata-containers/vmlinuz.container"
  14. image = "/opt/kata/share/kata-containers/kata-containers.img"
  15. machine_type = "pc"
  16. # Optional space-separated list of options to pass to the guest kernel.
  17. # For example, use `kernel_params = "vsyscall=emulate"` if you are having
  18. # trouble running pre-2.15 glibc.
  19. #
  20. # WARNING: - any parameter specified here will take priority over the default
  21. # parameter value of the same name used to start the virtual machine.
  22. # Do not set values here unless you understand the impact of doing so as you
  23. # may stop the virtual machine from booting.
  24. # To see the list of default parameters, enable hypervisor debug, create a
  25. # container and look for 'default-kernel-parameters' log entries.
  26. kernel_params = ""
  27. # Path to the firmware.
  28. # If you want that qemu uses the default firmware leave this option empty
  29. firmware = ""
  30. # Machine accelerators
  31. # comma-separated list of machine accelerators to pass to the hypervisor.
  32. # For example, `machine_accelerators = "nosmm,nosmbus,nosata,nopit,static-prt,nofw"`
  33. machine_accelerators=""
  34. # Default number of vCPUs per SB/VM:
  35. # unspecified or 0 --> will be set to 1
  36. # < 0 --> will be set to the actual number of physical cores
  37. # > 0 <= number of physical cores --> will be set to the specified number
  38. # > number of physical cores --> will be set to the actual number of physical cores
  39. default_vcpus = 1
  40. # Default maximum number of vCPUs per SB/VM:
  41. # unspecified or == 0 --> will be set to the actual number of physical cores or to the maximum number
  42. # of vCPUs supported by KVM if that number is exceeded
  43. # > 0 <= number of physical cores --> will be set to the specified number
  44. # > number of physical cores --> will be set to the actual number of physical cores or to the maximum number
  45. # of vCPUs supported by KVM if that number is exceeded
  46. # WARNING: Depending of the architecture, the maximum number of vCPUs supported by KVM is used when
  47. # the actual number of physical cores is greater than it.
  48. # WARNING: Be aware that this value impacts the virtual machine's memory footprint and CPU
  49. # the hotplug functionality. For example, `default_maxvcpus = 240` specifies that until 240 vCPUs
  50. # can be added to a SB/VM, but the memory footprint will be big. Another example, with
  51. # `default_maxvcpus = 8` the memory footprint will be small, but 8 will be the maximum number of
  52. # vCPUs supported by the SB/VM. In general, we recommend that you do not edit this variable,
  53. # unless you know what are you doing.
  54. default_maxvcpus = 0
  55. # Bridges can be used to hot plug devices.
  56. # Limitations:
  57. # * Currently only pci bridges are supported
  58. # * Until 30 devices per bridge can be hot plugged.
  59. # * Until 5 PCI bridges can be cold plugged per VM.
  60. # This limitation could be a bug in qemu or in the kernel
  61. # Default number of bridges per SB/VM:
  62. # unspecified or 0 --> will be set to 1
  63. # > 1 <= 5 --> will be set to the specified number
  64. # > 5 --> will be set to 5
  65. default_bridges = 1
  66. # Default memory size in MiB for SB/VM.
  67. # If unspecified then it will be set 2048 MiB.
  68. default_memory = {{ kata_containers_qemu_default_memory }}
  69. #
  70. # Default memory slots per SB/VM.
  71. # If unspecified then it will be set 10.
  72. # This is will determine the times that memory will be hotadded to sandbox/VM.
  73. #memory_slots = 10
  74. # The size in MiB will be plused to max memory of hypervisor.
  75. # It is the memory address space for the NVDIMM devie.
  76. # If set block storage driver (block_device_driver) to "nvdimm",
  77. # should set memory_offset to the size of block device.
  78. # Default 0
  79. #memory_offset = 0
  80. # Specifies virtio-mem will be enabled or not.
  81. # Please note that this option should be used with the command
  82. # "echo 1 > /proc/sys/vm/overcommit_memory".
  83. # Default false
  84. #enable_virtio_mem = true
  85. # Disable block device from being used for a container's rootfs.
  86. # In case of a storage driver like devicemapper where a container's
  87. # root file system is backed by a block device, the block device is passed
  88. # directly to the hypervisor for performance reasons.
  89. # This flag prevents the block device from being passed to the hypervisor,
  90. # 9pfs is used instead to pass the rootfs.
  91. disable_block_device_use = false
  92. # Shared file system type:
  93. # - virtio-9p (default)
  94. # - virtio-fs
  95. shared_fs = "virtio-9p"
  96. # Path to vhost-user-fs daemon.
  97. virtio_fs_daemon = "/opt/kata/bin/virtiofsd"
  98. # Default size of DAX cache in MiB
  99. virtio_fs_cache_size = 1024
  100. # Extra args for virtiofsd daemon
  101. #
  102. # Format example:
  103. # ["-o", "arg1=xxx,arg2", "-o", "hello world", "--arg3=yyy"]
  104. #
  105. # see `virtiofsd -h` for possible options.
  106. virtio_fs_extra_args = []
  107. # Cache mode:
  108. #
  109. # - none
  110. # Metadata, data, and pathname lookup are not cached in guest. They are
  111. # always fetched from host and any changes are immediately pushed to host.
  112. #
  113. # - auto
  114. # Metadata and pathname lookup cache expires after a configured amount of
  115. # time (default is 1 second). Data is cached while the file is open (close
  116. # to open consistency).
  117. #
  118. # - always
  119. # Metadata, data, and pathname lookup are cached in guest and never expire.
  120. virtio_fs_cache = "always"
  121. # Block storage driver to be used for the hypervisor in case the container
  122. # rootfs is backed by a block device. This is virtio-scsi, virtio-blk
  123. # or nvdimm.
  124. block_device_driver = "virtio-scsi"
  125. # Specifies cache-related options will be set to block devices or not.
  126. # Default false
  127. #block_device_cache_set = true
  128. # Specifies cache-related options for block devices.
  129. # Denotes whether use of O_DIRECT (bypass the host page cache) is enabled.
  130. # Default false
  131. #block_device_cache_direct = true
  132. # Specifies cache-related options for block devices.
  133. # Denotes whether flush requests for the device are ignored.
  134. # Default false
  135. #block_device_cache_noflush = true
  136. # Enable iothreads (data-plane) to be used. This causes IO to be
  137. # handled in a separate IO thread. This is currently only implemented
  138. # for SCSI.
  139. #
  140. enable_iothreads = false
  141. # Enable pre allocation of VM RAM, default false
  142. # Enabling this will result in lower container density
  143. # as all of the memory will be allocated and locked
  144. # This is useful when you want to reserve all the memory
  145. # upfront or in the cases where you want memory latencies
  146. # to be very predictable
  147. # Default false
  148. enable_mem_prealloc = {{ kata_containers_qemu_enable_mem_prealloc }}
  149. # Enable huge pages for VM RAM, default false
  150. # Enabling this will result in the VM memory
  151. # being allocated using huge pages.
  152. # This is useful when you want to use vhost-user network
  153. # stacks within the container. This will automatically
  154. # result in memory pre allocation
  155. #enable_hugepages = true
  156. # Enable vhost-user storage device, default false
  157. # Enabling this will result in some Linux reserved block type
  158. # major range 240-254 being chosen to represent vhost-user devices.
  159. enable_vhost_user_store = false
  160. # The base directory specifically used for vhost-user devices.
  161. # Its sub-path "block" is used for block devices; "block/sockets" is
  162. # where we expect vhost-user sockets to live; "block/devices" is where
  163. # simulated block device nodes for vhost-user devices to live.
  164. vhost_user_store_path = "/var/run/kata-containers/vhost-user"
  165. # Enable file based guest memory support. The default is an empty string which
  166. # will disable this feature. In the case of virtio-fs, this is enabled
  167. # automatically and '/dev/shm' is used as the backing folder.
  168. # This option will be ignored if VM templating is enabled.
  169. #file_mem_backend = ""
  170. # Enable swap of vm memory. Default false.
  171. # The behaviour is undefined if mem_prealloc is also set to true
  172. #enable_swap = true
  173. # This option changes the default hypervisor and kernel parameters
  174. # to enable debug output where available. This extra output is added
  175. # to the proxy logs, but only when proxy debug is also enabled.
  176. #
  177. # Default false
  178. enable_debug = {{ kata_containers_qemu_debug }}
  179. # Disable the customizations done in the runtime when it detects
  180. # that it is running on top a VMM. This will result in the runtime
  181. # behaving as it would when running on bare metal.
  182. #
  183. #disable_nesting_checks = true
  184. # This is the msize used for 9p shares. It is the number of bytes
  185. # used for 9p packet payload.
  186. #msize_9p = 8192
  187. # If true and vsocks are supported, use vsocks to communicate directly
  188. # with the agent and no proxy is started, otherwise use unix
  189. # sockets and start a proxy to communicate with the agent.
  190. # Default false
  191. #use_vsock = true
  192. # If false and nvdimm is supported, use nvdimm device to plug guest image.
  193. # Otherwise virtio-block device is used.
  194. # Default is false
  195. #disable_image_nvdimm = true
  196. # VFIO devices are hotplugged on a bridge by default.
  197. # Enable hotplugging on root bus. This may be required for devices with
  198. # a large PCI bar, as this is a current limitation with hotplugging on
  199. # a bridge. This value is valid for "pc" machine type.
  200. # Default false
  201. #hotplug_vfio_on_root_bus = true
  202. # Before hot plugging a PCIe device, you need to add a pcie_root_port device.
  203. # Use this parameter when using some large PCI bar devices, such as Nvidia GPU
  204. # The value means the number of pcie_root_port
  205. # This value is valid when hotplug_vfio_on_root_bus is true and machine_type is "q35"
  206. # Default 0
  207. #pcie_root_port = 2
  208. # If vhost-net backend for virtio-net is not desired, set to true. Default is false, which trades off
  209. # security (vhost-net runs ring0) for network I/O performance.
  210. #disable_vhost_net = true
  211. #
  212. # Default entropy source.
  213. # The path to a host source of entropy (including a real hardware RNG)
  214. # /dev/urandom and /dev/random are two main options.
  215. # Be aware that /dev/random is a blocking source of entropy. If the host
  216. # runs out of entropy, the VMs boot time will increase leading to get startup
  217. # timeouts.
  218. # The source of entropy /dev/urandom is non-blocking and provides a
  219. # generally acceptable source of entropy. It should work well for pretty much
  220. # all practical purposes.
  221. #entropy_source= "/dev/urandom"
  222. # Path to OCI hook binaries in the *guest rootfs*.
  223. # This does not affect host-side hooks which must instead be added to
  224. # the OCI spec passed to the runtime.
  225. #
  226. # You can create a rootfs with hooks by customizing the osbuilder scripts:
  227. # https://github.com/kata-containers/osbuilder
  228. #
  229. # Hooks must be stored in a subdirectory of guest_hook_path according to their
  230. # hook type, i.e. "guest_hook_path/{prestart,postart,poststop}".
  231. # The agent will scan these directories for executable files and add them, in
  232. # lexicographical order, to the lifecycle of the guest container.
  233. # Hooks are executed in the runtime namespace of the guest. See the official documentation:
  234. # https://github.com/opencontainers/runtime-spec/blob/v1.0.1/config.md#posix-platform-hooks
  235. # Warnings will be logged if any error is encountered will scanning for hooks,
  236. # but it will not abort container execution.
  237. #guest_hook_path = "/usr/share/oci/hooks"
  238. [factory]
  239. # VM templating support. Once enabled, new VMs are created from template
  240. # using vm cloning. They will share the same initial kernel, initramfs and
  241. # agent memory by mapping it readonly. It helps speeding up new container
  242. # creation and saves a lot of memory if there are many kata containers running
  243. # on the same host.
  244. #
  245. # When disabled, new VMs are created from scratch.
  246. #
  247. # Note: Requires "initrd=" to be set ("image=" is not supported).
  248. #
  249. # Default false
  250. #enable_template = true
  251. # Specifies the path of template.
  252. #
  253. # Default "/run/vc/vm/template"
  254. #template_path = "/run/vc/vm/template"
  255. # The number of caches of VMCache:
  256. # unspecified or == 0 --> VMCache is disabled
  257. # > 0 --> will be set to the specified number
  258. #
  259. # VMCache is a function that creates VMs as caches before using it.
  260. # It helps speed up new container creation.
  261. # The function consists of a server and some clients communicating
  262. # through Unix socket. The protocol is gRPC in protocols/cache/cache.proto.
  263. # The VMCache server will create some VMs and cache them by factory cache.
  264. # It will convert the VM to gRPC format and transport it when gets
  265. # requestion from clients.
  266. # Factory grpccache is the VMCache client. It will request gRPC format
  267. # VM and convert it back to a VM. If VMCache function is enabled,
  268. # kata-runtime will request VM from factory grpccache when it creates
  269. # a new sandbox.
  270. #
  271. # Default 0
  272. #vm_cache_number = 0
  273. # Specify the address of the Unix socket that is used by VMCache.
  274. #
  275. # Default /var/run/kata-containers/cache.sock
  276. #vm_cache_endpoint = "/var/run/kata-containers/cache.sock"
  277. [proxy.kata]
  278. path = "/opt/kata/libexec/kata-containers/kata-proxy"
  279. # If enabled, proxy messages will be sent to the system log
  280. # (default: disabled)
  281. enable_debug = {{ kata_containers_qemu_debug }}
  282. [shim.kata]
  283. path = "/opt/kata/libexec/kata-containers/kata-shim"
  284. # If enabled, shim messages will be sent to the system log
  285. # (default: disabled)
  286. enable_debug = {{ kata_containers_qemu_debug }}
  287. # If enabled, the shim will create opentracing.io traces and spans.
  288. # (See https://www.jaegertracing.io/docs/getting-started).
  289. #
  290. # Note: By default, the shim runs in a separate network namespace. Therefore,
  291. # to allow it to send trace details to the Jaeger agent running on the host,
  292. # it is necessary to set 'disable_new_netns=true' so that it runs in the host
  293. # network namespace.
  294. #
  295. # (default: disabled)
  296. #enable_tracing = true
  297. [agent.kata]
  298. # If enabled, make the agent display debug-level messages.
  299. # (default: disabled)
  300. enable_debug = {{ kata_containers_qemu_debug }}
  301. # Enable agent tracing.
  302. #
  303. # If enabled, the default trace mode is "dynamic" and the
  304. # default trace type is "isolated". The trace mode and type are set
  305. # explicity with the `trace_type=` and `trace_mode=` options.
  306. #
  307. # Notes:
  308. #
  309. # - Tracing is ONLY enabled when `enable_tracing` is set: explicitly
  310. # setting `trace_mode=` and/or `trace_type=` without setting `enable_tracing`
  311. # will NOT activate agent tracing.
  312. #
  313. # - See https://github.com/kata-containers/agent/blob/master/TRACING.md for
  314. # full details.
  315. #
  316. # (default: disabled)
  317. #enable_tracing = true
  318. #
  319. #trace_mode = "dynamic"
  320. #trace_type = "isolated"
  321. # Comma separated list of kernel modules and their parameters.
  322. # These modules will be loaded in the guest kernel using modprobe(8).
  323. # The following example can be used to load two kernel modules with parameters
  324. # - kernel_modules=["e1000e InterruptThrottleRate=3000,3000,3000 EEE=1", "i915 enable_ppgtt=0"]
  325. # The first word is considered as the module name and the rest as its parameters.
  326. # Container will not be started when:
  327. # * A kernel module is specified and the modprobe command is not installed in the guest
  328. # or it fails loading the module.
  329. # * The module is not available in the guest or it doesn't met the guest kernel
  330. # requirements, like architecture and version.
  331. #
  332. kernel_modules=[]
  333. [netmon]
  334. # If enabled, the network monitoring process gets started when the
  335. # sandbox is created. This allows for the detection of some additional
  336. # network being added to the existing network namespace, after the
  337. # sandbox has been created.
  338. # (default: disabled)
  339. #enable_netmon = true
  340. # Specify the path to the netmon binary.
  341. path = "/opt/kata/libexec/kata-containers/kata-netmon"
  342. # If enabled, netmon messages will be sent to the system log
  343. # (default: disabled)
  344. enable_debug = {{ kata_containers_qemu_debug }}
  345. [runtime]
  346. # If enabled, the runtime will log additional debug messages to the
  347. # system log
  348. # (default: disabled)
  349. enable_debug = {{ kata_containers_qemu_debug }}
  350. #
  351. # Internetworking model
  352. # Determines how the VM should be connected to the
  353. # the container network interface
  354. # Options:
  355. #
  356. # - macvtap
  357. # Used when the Container network interface can be bridged using
  358. # macvtap.
  359. #
  360. # - none
  361. # Used when customize network. Only creates a tap device. No veth pair.
  362. #
  363. # - tcfilter
  364. # Uses tc filter rules to redirect traffic from the network interface
  365. # provided by plugin to a tap interface connected to the VM.
  366. #
  367. internetworking_model="tcfilter"
  368. # disable guest seccomp
  369. # Determines whether container seccomp profiles are passed to the virtual
  370. # machine and applied by the kata agent. If set to true, seccomp is not applied
  371. # within the guest
  372. # (default: true)
  373. disable_guest_seccomp=true
  374. # If enabled, the runtime will create opentracing.io traces and spans.
  375. # (See https://www.jaegertracing.io/docs/getting-started).
  376. # (default: disabled)
  377. #enable_tracing = true
  378. # If enabled, the runtime will not create a network namespace for shim and hypervisor processes.
  379. # This option may have some potential impacts to your host. It should only be used when you know what you're doing.
  380. # `disable_new_netns` conflicts with `enable_netmon`
  381. # `disable_new_netns` conflicts with `internetworking_model=tcfilter` and `internetworking_model=macvtap`. It works only
  382. # with `internetworking_model=none`. The tap device will be in the host network namespace and can connect to a bridge
  383. # (like OVS) directly.
  384. # If you are using docker, `disable_new_netns` only works with `docker run --net=none`
  385. # (default: false)
  386. #disable_new_netns = true
  387. # if enabled, the runtime will add all the kata processes inside one dedicated cgroup.
  388. # The container cgroups in the host are not created, just one single cgroup per sandbox.
  389. # The runtime caller is free to restrict or collect cgroup stats of the overall Kata sandbox.
  390. # The sandbox cgroup path is the parent cgroup of a container with the PodSandbox annotation.
  391. # The sandbox cgroup is constrained if there is no container type annotation.
  392. # See: https://godoc.org/github.com/kata-containers/runtime/virtcontainers#ContainerType
  393. sandbox_cgroup_only={{ kata_containers_qemu_sandbox_cgroup_only }}
  394. # Enabled experimental feature list, format: ["a", "b"].
  395. # Experimental features are features not stable enough for production,
  396. # they may break compatibility, and are prepared for a big version bump.
  397. # Supported experimental features:
  398. # (default: [])
  399. experimental=[]