Skip to content

Images

Commands for managing VM images — importing from VMFiles, pulling and pushing to registries, exporting, tagging, and cleanup.

import

Import a VM image either from a VMFile definition or directly from a raw disk image file. For a VMFile, the CLI reads the manifest, validates it with the daemon, resolves the referenced disk image path, and streams the disk image to the daemon in chunks via gRPC.

bash
vmr import <VMFILE|IMAGE_PATH> [OPTIONS]

Arguments

ArgumentDescription
VMFILE|IMAGE_PATHPath to a VMFile (e.g., ./VMFile) or a disk image (e.g., ./image.qcow2)

Options

FlagShortDescription
--context <PATH>-cContext path for resolving relative paths in the VMFile
--tag <TAG>-tTags to assign to the imported image (can be specified multiple times)
--force-fForce overwrite if an image with the same name already exists
--format <FORMAT>Disk format (qcow2, raw, vmdk, vdi, vhdx) — required for direct import
--name <NAME>Image name (e.g., test-image or user/test-image) — required for direct import
--cpus <CPUS>CPU count for direct import (default: 2)
--memory <MIB>Memory in MiB for direct import (default: 2048)
--bootloader <TYPE>Bootloader for direct import: bios or uefi (default: bios)

A direct disk-image import is triggered by passing --format or --name; otherwise the path is treated as a VMFile.

Examples

bash
# VMFile-driven import
vmr import ./VMFile -t latest

vmr import ./VMFile -t latest -t v1.0.0

vmr import ./MyImage.VMFile -c ./build-context -t latest -f

# Direct disk-image import (no VMFile)
vmr import ./disk.qcow2 --format qcow2 --name myuser/my-vm --cpus 4 --memory 4096 -t latest

# VMFile with a remote diskImageSource — the daemon downloads the image itself
vmr import ./VMFile -t latest

TIP

For VMFile imports, the disk image path can be relative (resolved from the VMFile's directory) or absolute. Use --context to override the base directory for relative path resolution.

TIP

A VMFile can reference a disk image by URL instead of a local path with spec.diskImageSource. In that mode vmr uploads nothing — the daemon fetches and verifies the image directly against the required sha256 checksum.

images

List all locally stored VM images, showing repository name, tag, digest, size, and creation date.

bash
vmr images

Examples

bash
vmr images

pull

Pull a VM image from the remote registry to local storage. Requires authentication — run vmr login first.

bash
vmr pull <NAME[:TAG]>

Arguments

ArgumentDescription
NAME[:TAG]Image reference (e.g., myuser/my-vm:latest)

Examples

bash
vmr pull myuser/my-vm:latest

vmr pull myuser/my-vm

WARNING

If no tag is specified, the behavior depends on the registry server's default tag resolution. It is recommended to always specify an explicit tag.

push

Push a locally stored VM image to the remote registry. Requires authentication — run vmr login first.

bash
vmr push <NAME[:TAG]>

Arguments

ArgumentDescription
NAME[:TAG]Image reference (e.g., myuser/my-vm:latest)

Examples

bash
vmr push myuser/my-vm:latest

WARNING

Push access is controlled by ACL rules on the auth server. Your user account must have push permission for the target repository pattern.

export

Export a locally stored VM image to a file on disk.

bash
vmr export <NAME[:TAG]> [OPTIONS]

Arguments

ArgumentDescription
NAME[:TAG]Image reference to export

Options

FlagShortDescription
--output <PATH>-oExport file path (required)
--format <FORMAT>-fExport format: tar.gz (default) or image

Examples

bash
vmr export myuser/my-vm:latest -o ./my-vm-export.tar.gz

vmr export myuser/my-vm:latest -o ./my-vm.qcow2 -f image

manifest

Inspect the manifest of a locally stored VM image. Displays the full manifest JSON including blob digests and image configuration.

bash
vmr manifest <NAME[:TAG]>

Arguments

ArgumentDescription
NAME[:TAG]Image reference to inspect

Examples

bash
vmr manifest myuser/my-vm:latest

tag

Tag an existing image with a new name and/or tag. This creates a new reference pointing to the same underlying image data without copying blobs.

bash
vmr tag <SOURCE> <TARGET>

Arguments

ArgumentDescription
SOURCESource image reference (e.g., myuser/my-vm:latest)
TARGETTarget image reference (e.g., myuser/my-vm:v2.0)

Examples

bash
vmr tag myuser/my-vm:latest myuser/my-vm:v1.0.0

vmr tag myuser/my-vm:latest production/my-vm:stable

rmi

Remove one or more locally stored images. This deletes the manifest and, unless other tags reference the same blobs, the underlying data.

bash
vmr rmi <IMAGE>... [OPTIONS]

Arguments

ArgumentDescription
IMAGEOne or more image references to remove

Options

FlagShortDescription
--force-fForce removal without confirmation

Examples

bash
vmr rmi myuser/my-vm:latest

vmr rmi myuser/my-vm:v1.0 myuser/my-vm:v2.0 -f

overlay

Manage overlay images — images derived from a base image that store only the delta from that base (created with vmr commit --base). Overlays keep derived images small by sharing the base image's data.

bash
vmr overlay <COMMAND>

Subcommands

SubcommandDescription
lsList overlay images
inspect <NAME[:TAG]>Show details about an overlay image

Options

CommandFlagShortDescription
overlay ls--names-only-qPrint only overlay names (NAME:TAG), one per line

Examples

bash
vmr overlay ls

vmr overlay inspect my-ubuntu:patched

gc

Run garbage collection to clean up orphaned blobs and manifests that are no longer referenced by any image tag.

bash
vmr gc [OPTIONS]

Options

FlagShortDescription
--dry-runShow what would be deleted without actually deleting
--force-fForce cleanup even if potentially dangerous

Examples

bash
vmr gc --dry-run

vmr gc

vmr gc -f

TIP

Run vmr gc --dry-run first to preview what will be removed. This is especially useful after bulk image deletions to reclaim disk space safely.

Built with Go and Rust