Atlas of Apache CloudStack global configuration variables, defined at the KVM host level

Not all parameters are described in the article, but only those that you usually need to change when configuring new CloudStack clouds that use the KVM hypervisor. The parameters for the KVM host are applied when configuring the host and after each reload of the cloudstack-agent.

CloudStack version: 4.11.1

You can change the settings in the configuration file on the virtualization node: /etc/cloudstack/agent/agent.properties

Many parameters are described in the documentation Apache CloudStack. A full list of parameters with comments can be found in Git-repository CloudStack. Because not all parameters are documented, you can also find some of them in the source code. The parameters described below are recommended to be specified after the successful addition of the host to the cloud, but before the provisioning of virtual machines.

vm.migrate.downtime

  • Proposed value: 10000
  • The maximum unavailability time that can be allowed when a virtual machine is migrated. In this case, it is suggested to use 10 seconds. This parameter affects the feasibility of migration using libvirt. The greater the unavailability time, the more likely that heavily-loaded virtual machines will be able to migrate. It is recommended not to reduce this parameter below the level that is acceptable for you.

vm.migrate.pauseafter

  • Proposed value: 60000
  • The parameter determines after what migration time libvirt executes for the VM (suspend) and migrates in the frozen state. This parameter is important for loaded machines that work so intensively with memory that libvirt can not migrate them. If set to too high a value, some machines can migrate for a very long time. Usually on 10G links, most machines should migrate in 10-20 seconds, so 60 seconds look justified. In the case of the 1Gbit/s link, we recommend that this time be reduced, as this increases the likelihood of migration and reduces its time.

host.overcommit.mem.mb

  • Proposed value: 0
  • This parameter can be used when using memory compression mechanisms, such as KSM, zSwap, zRAM, as well as fast paging devices. If your heuristic shows, for example, that with 128 GB memory and using compression and swap mechanisms, virtual machines feel comfortable when allocating memory in 160 GB, then you can specify host.overcommit.mem.mb = 32768, which will correspond to 32 GB of additional available memory.

host.reserved.mem.mb

  • Proposed value: 1024
  • The level of reservation of the host memory for non-allocation. A useful parameter if a node uses some other software that requires memory. For example, if Ceph daemons are installed on the node together with the hypervisor, then this parameter must be set to the value equal to the required storage capacity of + 1 GB for the CloudStack agent. If this parameter is used, host.overcommit.mem.mb must be set to 0.

guest.cpu.mode

  • Proposed value: host-passthrough
  • Virtual machines observe the CPU model as it is. This option should be changed only if the cluster uses different generations of CPUs. In this case, when migrating, it is necessary that the models are the same, and with host-passthrough they will be different, respectively, migration will not work. If the CPU generation is the same, even if different CPUs, then you can use host-passthrough.

vm.watchdog.action

  • Proposed value: reset
  • If the watchdog of the virtual machine has detected that the virtual machine is hung, it will be rebooted. You can also put “none” (by default) and “poweroff”.

vm.watchdog.model

  • Proposed value: i6300esb
  • Determines which model to use. This value is recommended.

Other KVM CloudStack agent settings have “good” default values and, normally, do not require modification.