Supervises a single Firecracker microVM, split into four independent children so no lifecycle invariant rides on the ordering of a flat child list:
Hyper.Node.FireVMM.Core- the daemon container +:gen_statemcontroller, coupled under:one_for_all(a controller crash also discards the daemon, so no VM is orphaned). All order-sensitivity is contained there.Hyper.Node.FireVMM.Client- the API client. It depends only onvm_id(it derives the socket itself) and on nothing else in the tree, so it is an independent peer: its crashes don't disturb the core, and a core restart doesn't cycle it.Hyper.Node.FireVMM.Agent.Relay- the host-side gRPC relay that bridges inbound Unix-socket connections to the in-guest agent over vsock. Restart is:transient: an abnormal crash (unexpected accept error) is restarted; a clean stop (:shutdownfrom the supervisor) is not.Hyper.Node.FireVMM.Meter- the per-VM compute meter, sampling the VM's cgroupcpu.statintoHyper.Metering.Usagebilling windows. Deliberately the last child: it stops first at teardown, capturing the final usage window before the daemon removes the cgroup.
Strategy is :one_for_one: the four children are restarted independently.
Summary
Functions
Returns a specification to start this module under a supervisor.
The scheduler period of each VM.
Test whether the system can run firecracker VMMs.
Functions
@spec child_spec(Hyper.Node.FireVMM.Opts.t()) :: Supervisor.child_spec()
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec cpu_period() :: Unit.Time.t()
The scheduler period of each VM.
@spec start_link(Hyper.Node.FireVMM.Opts.t()) :: Supervisor.on_start()
@spec test_system() :: :ok | {:error, term()}
Test whether the system can run firecracker VMMs.