Module models

Source

Re-exports§

pub use crate::logger::Logger;

Structs§

Balloon
Represents a memory balloon device that can dynamically adjust guest memory size. This device allows for memory overcommitment by reclaiming unused memory from the guest and making it available to the host or other guests. It’s particularly useful in environments where memory resources need to be managed efficiently across multiple VMs.
BalloonStats
Provides detailed memory statistics from the balloon device, helping monitor memory usage patterns and performance of the guest VM. These statistics are essential for making informed decisions about memory allocation and identifying potential memory-related issues.
BalloonStatsUpdate
Used to update the statistics polling interval of a balloon device. This allows for dynamic adjustment of how frequently memory statistics are collected without needing to recreate the balloon device.
BootSource
Defines the boot configuration for a microVM, specifying the kernel image, optional initial ramdisk, and kernel boot parameters. This configuration must be set before starting the microVM and cannot be modified after boot.
CpuConfig
Provides fine-grained control over CPU features exposed to the guest VM. This allows for platform-specific optimizations and security configurations by enabling or disabling specific CPU capabilities on both x86_64 and aarch64 architectures.
Drive
Represents a block device in the guest VM. This can be either a regular file or a block device on the host that is exposed to the guest. Supports both read-only and read-write modes, and can be configured as the root device for the guest filesystem.
EntropyDevice
Configures a virtual device that provides entropy/randomness to the guest VM. This is crucial for applications in the guest that require cryptographic operations or random number generation.
Error
Represents an error response from the Firecracker API. Used to provide detailed information about what went wrong during an API operation.
FirecrackerVersion
Contains version information about the Firecracker service. Used to ensure compatibility between the client and server.
InstanceInfo
Provides metadata about a Firecracker instance, including its identity, current state, and version information. This is useful for monitoring and managing multiple Firecracker instances.
MachineConfig
Defines the core configuration of a microVM, including CPU and memory resources. These settings determine the computational capacity and performance characteristics of the VM.
Metrics
Configures the metrics system for Firecracker, allowing for monitoring of various performance and operational metrics of the microVM.
MmdsConfig
Configures the Microvm Metadata Service (MMDS), which provides a way for the guest to securely access metadata and user data. This is similar to AWS EC2’s instance metadata service.
NetworkInterface
Defines a network interface for the guest VM, allowing for network connectivity. Supports configuration of MAC addresses and rate limiting for both receive and transmit traffic.
RateLimiter
Implements rate limiting for I/O operations, allowing control over bandwidth and operations per second. This is used by various devices like network interfaces and block devices to prevent resource exhaustion.
TokenBucket
Implements the token bucket algorithm for rate limiting. This provides a way to control both the steady-state rate and burst capacity for operations or bandwidth.
Vm
Represents the state of a Firecracker microVM. Used primarily in the context of VM lifecycle management and snapshotting operations.
VmConfig
Represents the configuration of a Firecracker microVM, including its boot source, drives, network interfaces, and machine configuration.
Vsock
Configures a vsock device, which provides a communication channel between the host and guest. This is particularly useful for services that need to communicate across the VM boundary without using traditional networking.

Enums§

CpuTemplate
Predefined CPU templates that configure sets of CPU features to match specific AWS EC2 instance types. This ensures consistent CPU feature sets across different Firecracker deployments and helps with workload compatibility.