pub struct NodeEnvironment {
pub driver: Arc<dyn VmDriver>,
pub network: Arc<dyn GuestNetwork>,
pub agent: Arc<dyn GuestAgentFactory>,
pub cow_manager: Arc<CowManager>,
}Expand description
What differs between hosts of the sandbox stack.
Fields§
§driver: Arc<dyn VmDriver>The VMM the sandboxes run under, behind the driver port
(arcbox_vm_driver::VmDriver). It must claim the Prepare and
Staging capabilities and offer vsock: the boot and warm-pool
flows spawn the VMM ahead of the guest, every flow stages the files
its computer boots from, and the guest agent is reached over vsock.
A driver that cannot is refused by
SandboxManager::new rather than at
the first boot.
network: Arc<dyn GuestNetwork>What the sandboxes’ NICs attach to, behind the guest-network port
(arcbox_vm_driver::net::GuestNetwork). It must offer the
NetworkReconcile capability: the quarantine ledger is how a host
learns which addresses a previous process still holds, and a
network without it is refused at construction rather than at the
first cleanup ticket.
agent: Arc<dyn GuestAgentFactory>How the runtime reaches the agent inside each sandbox, behind the
guest-agent port (crate::agent::GuestAgentFactory). The
reference is the arcbox-vm-proto client over the driver’s vsock
capability (crate::agent::VmProtoAgentFactory), which is what
every Firecracker sandbox speaks; a composer whose Computers are
not reachable that way supplies its own. The factory also decides
what the readiness gate needs from the driver, so an environment
whose driver cannot serve it is refused at construction rather than
at the first boot.
cow_manager: Arc<CowManager>The copy-on-write rootfs manager. Built by the composer, because
what it needs — the data directory, the loop-device tooling of the
host’s userland, where its dmsetup lives — is exactly what
differs between environments.