Lima VM provider backend plugin for mngr
Project description
mngr Lima Provider
Lima VM provider backend plugin for mngr. Runs agents in Lima VMs (QEMU/VZ) with SSH access.
Prerequisites
- Lima (
limactlon PATH)
Usage
# Install the plugin
uv tool install imbue-mngr-lima
# Create a VM host
mngr create @.lima
# Create with a custom Lima YAML config
mngr create @.lima -b "--file path/to/config.yaml"
# Pass flags to limactl start
mngr create @.lima -- --cpus=8 --memory=16GiB
host_dir layout: bind mount vs btrfs additional disk
The provider has two layouts for backing host_dir (the in-VM directory
mngr stores agent data under, default /mngr):
-
Bind mount (default,
is_host_data_volume_exposed=True).host_diris a 9p bind mount of~/.mngr/providers/lima/<name>/volumes/<host_id>/on the host machine. The host process can readhost_dircontents directly even while the VM is stopped, andget_volume_for_host()returns aHostVolumeusable bymngr event,mngr transcript, and destroy-time session-preservation hooks (mngr_claude'son_before_host_destroy). This is the right choice for most users. -
Btrfs additional disk (
is_host_data_volume_exposed=False). mngr attaches a Lima-managed btrfs-formatted additional disk (mngr-<host_id_hex>-data, qcow2 sparse under~/.lima/_disks/, default logical size100GiB) and symlinkshost_dirto Lima's auto-mount path for that disk (/mnt/lima-<disk_name>). No 9p bind mount is created. The trade-off:host_diris now a single consistent btrfs filesystem that can be snapshotted as one unit, but the host machine has no direct read path soget_volume_for_host()returnsNone. Offline reads (mngr event/mngr transcriptagainst a stopped Lima host) stop working until the host is started. This mode is intended for users who back up host_dir via btrfs snapshots; it is opt-in to avoid changing default behavior.
The chosen layout is locked in on the per-host record at create_host
time. Subsequent start_host / stop_host calls always replay the
same layout, so flipping the provider config later does not migrate
existing hosts. Hosts created before this option existed (records
without the field) default to bind-mount mode and keep today's
behavior forever.
To enable btrfs mode for new hosts:
# in ~/.mngr/config.toml (or via setting__extend in a create template)
[providers.lima]
is_host_data_volume_exposed = false
# Optional: override the default 100GiB logical disk size.
host_data_disk_size = "200GiB"
Running the agent in a Docker container in the VM (is_host_in_docker)
By default the agent runs directly inside the Lima VM. With
is_host_in_docker=True the provider instead provisions the VM with only
Docker + btrfs + an SSH "outer", and runs the agent inside a Docker
container in the VM, built from the project's Dockerfile exactly like the
docker and vps_docker providers. The point is consistency: every provider
installs dependencies the same way (one Dockerfile, no sudo, always in sync),
instead of duplicating the Dockerfile's install steps in a Lima-specific
provisioning script.
How it works:
- mngr treats the container as the host:
mngr connect/mngr exec/ ssh land inside the container, and Lima forwards the container's sshd out to a unique127.0.0.1:<port>on your machine. The VM itself is an "outer" that mngr otherwise does not touch (mirroring how thevps_dockerprovider treats its VPS). - This mode requires the btrfs additional-disk layout, so it forces
is_host_data_volume_exposed=false. A per-host btrfs subvolume on that disk backs the container'shost_dir, bind-mounted in as a Docker volume. - Consistent backups work from inside the container: the
mngr_vps_dockersnapshot helper is installed in the VM, and the in-container agent triggersbtrfs subvolume snapshotvia the same/mngr-snapshotrequest //mngr-snapshotsread contract the other Docker providers use. mngr stoppowers off the whole VM (freeing local RAM);startboots the VM and relaunches the container;destroyremoves the VM and the disk.- The image is built inside the VM via
mngr create ... -b "--file=Dockerfile" -b "."(same build args as thedockerprovider). Without build args, thedefault_imageis pulled instead. - Like btrfs mode, offline reads (
mngr event/mngr transcript) against a stopped host do not work until it is started.
[providers.lima]
is_host_in_docker = true
is_host_data_volume_exposed = false # required by is_host_in_docker
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file imbue_mngr_lima-0.1.5.tar.gz.
File metadata
- Download URL: imbue_mngr_lima-0.1.5.tar.gz
- Upload date:
- Size: 63.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7ef35bc8826dec13bdf08186b22cd344b0a032595f503a254c086fb450a94fa
|
|
| MD5 |
6ee33e0be0789c3529cc16a6d3888b85
|
|
| BLAKE2b-256 |
17588ac1dbbbeebb5aa67c28855353a22f0842f8935ca7a0b2d57ef2bc2f017a
|
Provenance
The following attestation bundles were made for imbue_mngr_lima-0.1.5.tar.gz:
Publisher:
publish.yml on imbue-ai/mngr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
imbue_mngr_lima-0.1.5.tar.gz -
Subject digest:
b7ef35bc8826dec13bdf08186b22cd344b0a032595f503a254c086fb450a94fa - Sigstore transparency entry: 1762762068
- Sigstore integration time:
-
Permalink:
imbue-ai/mngr@fcfb92747c364adc8147dab7e4b065bfdcb9e148 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/imbue-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fcfb92747c364adc8147dab7e4b065bfdcb9e148 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file imbue_mngr_lima-0.1.5-py3-none-any.whl.
File metadata
- Download URL: imbue_mngr_lima-0.1.5-py3-none-any.whl
- Upload date:
- Size: 47.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27ff7918af6d048ebf51a96f1912dfdf740b60a381deabaae814ff7d55e3d40f
|
|
| MD5 |
ebff26c8c96d60d03a46a91c692f8053
|
|
| BLAKE2b-256 |
8774e8b19c7cd3b3311865600202a3c06acf5967975ee7fd3d71072f21101791
|
Provenance
The following attestation bundles were made for imbue_mngr_lima-0.1.5-py3-none-any.whl:
Publisher:
publish.yml on imbue-ai/mngr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
imbue_mngr_lima-0.1.5-py3-none-any.whl -
Subject digest:
27ff7918af6d048ebf51a96f1912dfdf740b60a381deabaae814ff7d55e3d40f - Sigstore transparency entry: 1762768458
- Sigstore integration time:
-
Permalink:
imbue-ai/mngr@fcfb92747c364adc8147dab7e4b065bfdcb9e148 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/imbue-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fcfb92747c364adc8147dab7e4b065bfdcb9e148 -
Trigger Event:
workflow_dispatch
-
Statement type: