Hyper.Vm.Instance.Spec (Hyper v0.1.0)

Copy Markdown View Source

Resource bundle for one instance type.

Summary

Functions

Firecracker machine-config for this spec, the guest-facing analog of cgroup_v2/1. vcpus is a fractional cgroup quota; the guest needs a positive integer count, so it's rounded up and floored at 1 (a 0.25-vCPU :micro still presents one vCPU). Memory is the spec's mem in MiB.

Types

t()

@type t() :: %Hyper.Vm.Instance.Spec{
  disk: Unit.Information.t(),
  disk_bw: Unit.Bandwidth.t(),
  mem: Unit.Information.t(),
  net_bw: Unit.Bandwidth.t(),
  vcpus: number()
}

Functions

cgroup_v2(spec)

@spec cgroup_v2(t()) :: Sys.Linux.Cgroup.V2.Config.t()

machine_config(spec)

@spec machine_config(t()) :: Hyper.Firecracker.Api.MachineConfiguration.t()

Firecracker machine-config for this spec, the guest-facing analog of cgroup_v2/1. vcpus is a fractional cgroup quota; the guest needs a positive integer count, so it's rounded up and floored at 1 (a 0.25-vCPU :micro still presents one vCPU). Memory is the spec's mem in MiB.