Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureGuestAgent ¶
EnsureGuestAgent returns the path to the cached lima guest agent binary for the current host architecture, downloading it from Lima's GitHub release if not already present.
Cache location: <klimaxHome>/share/lima/lima-guestagent.Linux-<arch>-<limaVer>.gz
func EnsureImageDisk ¶ added in v0.1.52
EnsureImageDisk creates the persistent Lima data disk backing the guest's container image store (/var/lib/containerd), if it does not already exist.
Named Lima disks live in $LIMA_HOME/_disk/<name> — outside the instance directory — and deliberately survive `klimax destroy`. That is the whole point: `destroy` otherwise discards the unpacked image store (kindest/node, registry:2, and any locally built images, which no mirror can restore).
Lima itself partitions and formats the disk on first attach (Disk.Format), and unlocks it when the instance stops, so re-creating the VM re-attaches the same disk with its contents intact.
func GuestAgentCachePath ¶ added in v0.1.51
GuestAgentCachePath returns where the guest agent matching this binary's Lima module version is cached. The filename is version-stamped, so bumping the Lima module points at a new path and the matching agent is re-downloaded (guest and host agents must be the same version — a stale cached agent could break the hostagent protocol). Earlier versions linger until 'klimax prune' removes them.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles the Lima VM lifecycle for a named klimax instance.
func (*Manager) Delete ¶
Delete removes the VM and all its data. The instance must be stopped first (or pass force=true, which forcibly kills it).
func (*Manager) EnsureRunning ¶
func (m *Manager) EnsureRunning(ctx context.Context, cfg *config.Config, showLogs bool) (*limatype.Instance, error)
EnsureRunning is idempotent: creates the instance if it doesn't exist, starts it if it's stopped, and returns the running instance. When showLogs is true, Lima's host-agent logs are streamed to stderr in real time and Lima's built-in cloud-init progress display is enabled.