Skip to content

Repository files navigation

battery

CI Go Reference Go Report Card Go Version License

battery is a MicroVM Warm Pool Manager for flintlock. It manages pools of pre-provisioned, pre-booted microVMs so consumers can claim an already-running VM instantly, instead of waiting for flintlock to provision one on demand. It's part of the liquidmetal-dev family of projects, alongside flintlock and guest-agent.

Status: early-stage / pre-alpha. The gRPC API surface is defined, but the pool reconciliation, replenishment, and lease logic is not yet implemented.

Architecture

battery is made up of two binaries:

  • poolmgrd (cmd/poolmgrd) — the central pool manager daemon. It serves the gRPC API defined under api/proto/poolmgr/v1alpha1:

    • PoolAdmin — create, update, delete, and list pool definitions.
    • Lease — claim a VM from a pool, heartbeat it, and release it back.
    • Events — a server-streaming subscription for pool/VM/lease lifecycle events.

    It's designed to reconcile a fleet of flintlock hosts against each pool's desired state, replenishing VMs using a per-pool strategy, and, once implemented, persist state (e.g., in an embedded SQLite database).

  • poolmgr-hostagent (cmd/poolmgr-hostagent) — a sidecar that runs alongside each flintlock host. Flintlock's guest-agent is only reachable over a host-local vsock socket, so this sidecar proxies exec/ping calls to the in-VM guest-agent on poolmgrd's behalf, exposed via the Hostagent gRPC service.

See docs/design/2026-09-05-microvm-warm-pool-manager-design.md for the full design rationale and decisions.

Getting started

Prerequisites

  • Go 1.25+
  • mise (recommended) to install pinned tool versions from mise.tomlbuf, golangci-lint, protoc-gen-go, and protoc-gen-go-grpc.

Build and test

go build ./...
go vet ./...
go test ./...
golangci-lint run

Working with the API protos

The gRPC API is defined in api/proto using buf. After editing a .proto file, regenerate the Go code with:

./hack/generate-proto.sh

License

Apache License 2.0 — see LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages