MicroVM runners
Let CodeHerder launch its own short-lived AWS devices automatically when your workspace's queue outruns your fleet.
A MicroVM pool is a device that launches its own short-lived compute in your AWS account, only when it is needed. CodeHerder watches your workspace’s queue. When work is waiting with nowhere to run, it starts a microVM. The microVM registers as a device, runs sessions one after another, and goes away when it is no longer needed. Each session runs in its own container, and CodeHerder removes that container and its files when the session ends.
The pool is one row in Set up → Devices, for example “Lambda MicroVM (us-west-2)”. The microVMs it launches show on its detail page, not in the device list.
A microVM runs the container executor with Docker inside the VM. Each stage runs in a hardened container. The device reports the backend microvm and the level isolated. See Self-hosted device isolation. The Devices page shows a No Docker badge only on an older pool whose image predates Docker in the VM. CodeHerder does not place tasks that need Docker on that pool. Contact CodeHerder support to get the image rebuilt.
This is the automatic sibling of Launch a device on AWS, which launches one always-on EC2 device. A pool launches microVMs by itself, repeatedly, whenever your fleet falls short. If you’d rather launch your own disposable machines and have them clean themselves up, see Devices that clean up after themselves instead.
Set it up
Set up a pool with Launch on AWS. Choose the compute type lambda-microvm in the CloudFormation form and create the stack. See Launch a device on AWS. The stack does the whole setup:
- It creates the roles and the artifact bucket in your account.
- It registers the pool with CodeHerder. CodeHerder builds the runner image in your account through a role it assumes.
- The pool shows Building image, then Ready.
You run no AWS CLI step and no ch runner command. You store no access key.
The pool device
The pool is a normal device in most ways. Links, enable and disable, and capabilities work as they do for any device. See Managing your devices.
From the CLI, size the pool and turn it on or off. These commands are owner and admin only:
ch device edit <pool> --max-sessions <n>
ch device enable <pool>
ch device disable <pool>
A pool holds no device token. Token rotate and revoke refuse a pool. To cut it off, disable or archive it. See Device tokens.
Session limit on the pool detail page is the number of microVMs that run at once. You can change it there, and the microVM size too. The image, the roles and the region come from the stack and are read-only.
Check whether you’re ready
If a pool is not launching the way you expect, run:
ch runner status
It checks every prerequisite: the pool is enabled, CodeHerder can assume the access role, the image is ready, and you are not at your cap. It reports a verdict for each one and, for anything missing, what fixes it. Run it before you look for what is wrong. It usually tells you outright.
When CodeHerder launches a runner
CodeHerder only launches when work is genuinely stuck: the shortfall has to show up on two checks in a row, not just a brief spike, and there’s a short cooldown after each launch so it doesn’t pile on. If a launch fails repeatedly, CodeHerder backs off before trying that workspace again. None of this is something you tune — it’s how the watcher behaves.
Why a launch is refused
If CodeHerder wants to launch but can’t, it records a MicroVM runner event in your workspace’s activity feed explaining why. The usual reasons: your concurrent-VM cap is reached, the fleet-wide launch budget for that check is used up, you’re in the cooldown after a recent launch, you’re in a backoff after recent failures, or the pool is not ready. The pool is not ready when CodeHerder cannot assume the access role, when the image is still building, or when the image, the execution role or the region is missing. A pool with no stack behind it shows Access lost. The same reason won’t repeat on every single check while it persists; CodeHerder spaces those events out.
Seeing what happened
ch runner list
Lists this workspace’s launches — and its child workspaces’ — newest first, with each one’s state, the microVM ID, the image, its launched/dialed/terminated timestamps, the device it became, and the reason it ended if it did. Narrow it to one state at a time with --state launching, --state dialed, --state lost, or --state terminated. There’s no single-launch lookup command; the list is the whole picture. The same launches also show up in the activity feed under the MicroVM runner label.
A runner that never arrives
If a launched microVM never registers itself as a device within its dial-out window, CodeHerder terminates it and revokes its one-hour registration token — that token is only ever good for the one launch it was minted for. Every microVM also has its own maximum lifetime, as a backstop against a VM running (and costing you) forever. A runner that’s alive and doing work is never touched by this cleanup.
Turning it off
There are two switches.
Disable pauses the pool:
ch device disable <pool>
It stops all launching on CodeHerder’s next check. Enable the pool again to resume. The stack and the roles stay as they are.
Archive is the off switch. Archive the pool device in the app, or run ch device archive <pool>. CodeHerder stops launching, terminates the live microVMs, deletes the pool’s images and files, and removes the pool from the list. The roles and the bucket stay in your account until you delete the stack. Delete the stack to remove them. See Remove it.
Migrated setups
An older setup stored an AWS access key in the workspace settings. CodeHerder moved each such setup to a pool when it was upgraded. That pool runs in static-key mode and keeps working. Nothing for you to do. To rotate or remove its key, ask your CodeHerder operator. The operator steps are in the runner IAM reference in the product docs. To move to the new setup, launch a Lambda MicroVM stack, then archive the old pool.
Related guides
- Launch a device on AWS — launch one AWS device yourself, on demand, instead of letting CodeHerder launch them automatically
- Managing your devices — where a runner-launched device shows up once it’s registered, and how to manage it from there
- Why isn’t my task moving? — a runner clears the “no device available” cause automatically once it’s set up
- Activity feeds — where launch and refusal events show up alongside everything else in your workspace
- How agent environments work — how a microVM differs from an EC2 device
Last updated