Firecracker.Balloon (firecracker v0.1.0)

View Source

Represents the balloon device configuration for a Firecracker virtual machine.

The balloon device is used for memory management in Firecracker VMs by allowing dynamic memory allocation/deallocation. This module provides configuration for:

  • Memory inflation/deflation within the guest VM
  • Handling out-of-memory conditions
  • Statistics polling intervals

Fields

  • :amount_mib - Required. The amount of memory in mebibytes to assign to the balloon device
  • :deflate_on_oom - Required. Whether to deflate the balloon when the host experiences out-of-memory conditions
  • :stats_polling_interval_s - Optional. The interval in seconds for polling balloon statistics

Post-boot Behavior

Both :amount_mib and :stats_polling_interval_s can be modified after VM starts.

Summary

Types

t()

@type t() :: %Firecracker.Balloon{
  amount_mib: pos_integer(),
  applied?: boolean(),
  deflate_on_oom: boolean(),
  stats_polling_interval_s: pos_integer() | nil
}