# `Hyper.Node.Vmlinux`
[🔗](https://github.com/harmont-dev/hyper/blob/main/lib/hyper/node/vmlinux.ex#L1)

Resolves the guest kernel (vmlinux) image for this node.

Two sources, in priority order:

  1. An operator-configured path for the node's architecture, via
     `config :hyper, Hyper.Cfg.VmLinux, amd64: ..., aarch64: ...` (see `Hyper.Cfg.VmLinux.images/0`).
     If set, it wins - the operator can pin a custom kernel.
  2. Otherwise, the default kernel downloaded by
     `Hyper.Node.FireVMM.VmLinux.Provider` (highest version for the arch).

`test_system/0` verifies that whichever source applies actually yields a file
on disk for this node's architecture, so a misconfigured node aborts at boot
instead of failing the first VM launch.

# `path`

```elixir
@spec path(Sys.Arch.t()) :: Path.t()
```

Absolute path to the kernel image for `arch`: the operator-configured path if
set, otherwise the Provider's default kernel. Raises if neither resolves
(boot's `test_system/0` is expected to have caught that first).

# `test_system`

```elixir
@spec test_system() :: :ok | {:error, term()}
```

Ensure this node's vmlinux image is present. With an operator-configured path,
returns `{:error, {:vmlinux_missing, path}}` if that file is absent. Otherwise
falls back to the Provider's default kernel and returns
`{:error, {:vmlinux_missing, path}}` if it is absent, or `{:error, {:no_kernel, arch}}`
if the manifest has no kernel for this architecture.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
