Skip to content

Compose

Commands for managing multi-VM environments defined in VMCompose files. Compose enables declarative orchestration of multiple virtual machines with networking, cloud-init provisioning, resource overrides, and dependency ordering — similar to Docker Compose but for full virtual machines.

up

Create and start all services defined in a VMCompose file. The daemon parses the compose file, creates any defined networks, resolves service dependencies, and starts VMs in the correct order.

bash
vmr compose up [OPTIONS] [FILE]

Arguments

ArgumentDescription
FILEPath to the VMCompose file (defaults to ./VMCompose)

Options

FlagShortDescription
--project-name <NAME>-pOverride the project name (defaults to the name field in the compose file, or the directory name)
--detach-dRun in detached mode — return immediately after starting all services
--force-recreateRecreate VMs even if they already exist

Examples

bash
vmr compose up

vmr compose up ./cluster.VMCompose

vmr compose up ./cluster.VMCompose -p my-cluster -d

vmr compose up ./cluster.VMCompose --force-recreate

TIP

The compose file path must point to a valid VMCompose YAML file. Use vmr compose validate to check the file for errors before deploying. See the VMCompose reference for the full file format specification.

down

Stop and remove all services in a compose project. Networks created by the project are optionally removed as well.

bash
vmr compose down [OPTIONS] [SERVICES...]

Options

FlagShortDescription
--project-name <NAME>-pProject name to tear down (required)
--force-fForce stop VMs without graceful shutdown
--volumesAlso remove the VMs' disk volumes

Arguments

ArgumentDescription
SERVICESOptional list of specific services to stop (stops all if omitted)

Examples

bash
vmr compose down -p my-cluster

vmr compose down -p my-cluster -f --volumes

vmr compose down -p my-cluster web-server db-server

WARNING

Using --force sends an immediate destroy signal to each VM without allowing the guest OS to shut down gracefully. Data loss may occur for services with uncommitted writes.

list

List all compose projects tracked by the daemon, showing each project's status, service count, and creation time.

bash
vmr compose list [OPTIONS]

Options

FlagShortDescription
--names-only-qPrint only project names, one per line

Output Columns

ColumnDescription
PROJECTCompose project name
STATUSAggregate project status
SERVICESNumber of services in the project
CREATEDWhen the project was created

Examples

bash
vmr compose list

vmr compose list -q

ps

List the status of services in a compose project.

bash
vmr compose ps [OPTIONS]

Options

FlagShortDescription
--project-name <NAME>-pProject name to inspect (required)
--all-aShow all services, including stopped ones

Output Columns

ColumnDescription
SERVICEService name as defined in the compose file
VM NAMEActual VM name assigned to the service
STATUSCurrent state (running, stopped, etc.)
IPIP address assigned to the service (if available)
IMAGEVM image reference used by the service

Examples

bash
vmr compose ps -p my-cluster

vmr compose ps -p my-cluster -a

restart

Restart one or more services in a compose project. If no specific services are listed, all services in the project are restarted.

bash
vmr compose restart [OPTIONS] [SERVICES...]

Options

FlagShortDescription
--project-name <NAME>-pProject name (required)
--force-fForce restart without graceful shutdown

Arguments

ArgumentDescription
SERVICESOptional list of specific services to restart (restarts all if omitted)

Examples

bash
vmr compose restart -p my-cluster

vmr compose restart -p my-cluster web-server

vmr compose restart -p my-cluster -f web-server db-server

validate

Validate a VMCompose file for structural correctness without deploying anything. Reports whether the file is valid and lists the discovered service names.

bash
vmr compose validate [FILE]

Arguments

ArgumentDescription
FILEPath to the VMCompose file to validate (defaults to ./VMCompose)

Output

On success, prints ✓ VMCompose is valid followed by an overview of the parsed document:

  • Overview — file path, project name, kind, API version, and service/network counts
  • Services — each service with its image, resources, networks, dependencies, restart policy, disk size, and lifecycle
  • Networks — each network with its mode, bridge, subnet, gateway, driver, DHCP, and parent device

On failure, prints Validation failed: <reason> and exits with a non-zero status.

Examples

bash
vmr compose validate

vmr compose validate ./cluster.VMCompose

TIP

Validation checks include required field presence, value type correctness, valid network modes, valid restart policies, proper CIDR and IP notation in network configurations, and detection of cyclic service dependencies. For editor-level real-time validation, see the LSP component.

Built with Go and Rust