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]

Options

FlagShortDescription
--file <PATH>-fPath to the VMCompose file (required)
--project-name <NAME>-pOverride the project name (defaults to the name field in the compose file)
--detach-dRun in detached mode — return immediately after starting all services
--force-recreateForce recreation of VMs even if they already exist

Examples

bash
vmr compose up -f ./cluster.VMCompose

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

vmr compose up -f ./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
--volumes-vAlso remove associated volumes and ephemeral disks

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 -v

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.

ps

List the status of services in a compose project, showing each service's VM name, image, status, IP address, and creation time.

bash
vmr compose ps [OPTIONS]

Options

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

Output Fields

FieldDescription
NameService name as defined in the compose file
VM NameActual libvirt domain name assigned to the service
ImageVM image reference used by the service
StatusCurrent state (running, stopped, etc.)
IPIP address assigned to the service (if available)
CreatedWhen the service VM was created
Network IDIdentifier of the attached network

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 [OPTIONS]

Options

FlagShortDescription
--file <PATH>-fPath to the VMCompose file to validate (required)

Output Fields

FieldDescription
ValidWhether the compose file passed validation
MessageHuman-readable validation result or error description
ServicesList of service names discovered in the file

Examples

bash
vmr compose validate -f ./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