pub struct VmSpec {
pub kernel: Option<PathBuf>,
pub rootfs: Option<PathBuf>,
pub rootfs_read_only: Option<bool>,
pub vcpu_count: Option<u8>,
pub mem_size_mib: Option<u32>,
pub boot_args: Option<String>,
pub rootfs_rate_limit: Option<RateLimiter>,
pub network_interfaces: Vec<NetworkInterface>,
pub restore_from: Option<SnapshotRef>,
pub track_dirty_pages: Option<bool>,
}Expand description
Per-VM configuration override. Every field is optional; None falls back to the
provider’s workspace-level default (e.g. FirecrackerConfig).
Use VmSpec::default for cold boot with workspace defaults, or set
VmSpec::restore_from to restore from a snapshot instead of cold-booting.
To do a warm-pool handoff — a pre-restored VM that swaps its TAP and IP onto a
new tenant — set VmSpec::restore_from with SnapshotRef::network_overrides
populated. Firecracker 1.10+ supports this; 1.6 rejects it.
Fields§
§kernel: Option<PathBuf>Kernel image path. None = use workspace default.
rootfs: Option<PathBuf>Rootfs image path. None = use workspace default.
rootfs_read_only: Option<bool>Mount rootfs read-only. None = use workspace default.
vcpu_count: Option<u8>vCPU count override.
mem_size_mib: Option<u32>Memory size in MiB override.
boot_args: Option<String>Kernel command-line override.
rootfs_rate_limit: Option<RateLimiter>Rate limit applied to the rootfs drive.
network_interfaces: Vec<NetworkInterface>Network interfaces to attach pre-boot. Firecracker requires these to be configured
before InstanceStart. Empty by default — the VM has no network unless explicitly set.
restore_from: Option<SnapshotRef>If set, the VM boots from a snapshot via PUT /snapshot/load instead of cold-booting.
The spec’s kernel, rootfs, vcpu_count, mem_size_mib, boot_args, and
network_interfaces are ignored when restoring (the snapshot encodes its own machine
config). Use SnapshotRef::network_overrides to swap network interfaces on restore.
track_dirty_pages: Option<bool>Track dirty pages during execution — required to later capture diff snapshots. None = enabled (FC’s safer default for snapshot-friendly workloads).