create-machine
Create a virtual machine from an OCI image, start it, and wait until it is ready to run commands.
Instructions
Create a machine from an OCI image, start it, and wait until commands run in it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cmd | No | Workload command. Default keeps the container alive (sleep loop). Local only; the cloud create request has no such field. | |
| env | No | Environment variables | |
| cpus | No | ||
| name | No | Machine name. Omitted: an ephemeral mcp-<id> name, deleted when this server exits. A name without the mcp- prefix persists. | |
| image | Yes | OCI image reference, e.g. alpine or python:3.12-alpine | |
| start | No | Start and wait for readiness (default true) | |
| target | No | Which fleet to talk to. local is smolvm serve on this host; cloud is smol cloud at SMOL_CLOUD_URL. | local |
| network | No | Egress mode. Default open, except run-once on cloud which is blocked. Local: a blocked machine whose image still has to be pulled from a registry is refused by the API; pass open or an allow-list for that create. Cloud: blocked is sent as an allow-list of an unroutable range. | |
| memoryMb | No | ||
| allowCidrs | No | Egress allow-list of CIDR ranges. Overrides network. | |
| allowHosts | No | Egress allow-list of hostnames. Overrides network. Local: sent as allowedHosts. Cloud: sent inside the same cidrs list the published schema names, alongside allowCidrs. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ready | Yes | ||
| machine | Yes | ||
| ephemeral | Yes |