You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Request]: Allow a default runtime handler and per-machine runtime selection #2549
Runtime plugins other than container-runtime-linux can only be selected per container with container run/create --runtime. There is no way to make one the default, and container machines
always boot with the built-in runtime: MachineConfiguration has no runtime field, and neither container machine create nor container machine set accepts one.
This matters for third-party runtime plugins (for example a libkrun-based runtime that returns freed
guest memory to macOS) and for tools that create containers or boot machines on the user's behalf,
such as a compose plugin that runs its workload in a container machine. Those tools can't use another
runtime unless every invocation passes the flag, and for machines there is no flag at all.
Proposed approach
A [container] runtime system property (unset by default) used when no runtime is given.
Unset keeps today's behavior (container-runtime-<os>).
An optional per-machine runtime setting stored with the machine's boot config: container machine create --runtime <name> and container machine set runtime=<name>
(runtime= clears it).
The machine service resolves the runtime when it builds the machine's container config at boot.
An unknown runtime fails before anything is created, with an error naming where the value came
from.
I have an implementation of this approach with unit tests and docs, and I'm happy to open a PR or
adjust the design (for example separate container and machine defaults) based on maintainer
feedback.
Activity