One VM's private directory, and the launcher command line that runs the VM on it.
Kettlecorn.VM prepares an instance from a Kettlecorn.Sandbox,
runs command/1, and calls cleanup/1 after confirming launcher shutdown.
If shutdown cannot be confirmed, it retains the directory and logs an error.
Summary
Functions
Deletes the VM's private directory.
The bundled launcher's executable and arguments for this instance.
Creates the VM's private directory: a new directory with an unguessable
name, accessible only to this OS user, holding the guest's root (root/,
mounted at /) and, out of the guest's reach, the launcher's stderr. On
failure, removes what it created and raises.
The file the launcher's stderr goes to.
Types
@type t() :: %Kettlecorn.Sandbox.Instance{ dir: Path.t(), sandbox: Kettlecorn.Sandbox.t() }
Functions
@spec cleanup(t()) :: :ok
Deletes the VM's private directory.
The bundled launcher's executable and arguments for this instance.
@spec prepare(Kettlecorn.Sandbox.t()) :: t()
Creates the VM's private directory: a new directory with an unguessable
name, accessible only to this OS user, holding the guest's root (root/,
mounted at /) and, out of the guest's reach, the launcher's stderr. On
failure, removes what it created and raises.
The file the launcher's stderr goes to.