Skip to main content

vers commit

Save the current state of a VM as a commit.

Synopsis

Description

The commit command creates a snapshot of a VM’s current state by saving it as a commit. This preserves the exact state of the VM at a specific point in time. You can commit either your current HEAD VM or specify a particular VM by ID or alias.

Basic Usage

Commit Current HEAD VM

Creates a commit of whatever VM your HEAD currently points to.

Commit Specific VM

Creates a commit of the specified VM by ID or alias.

What Happens During Commit

  1. VM Identification: Resolves the target VM (provided or HEAD)
  2. State Capture: Creates a snapshot of the VM’s current state
  3. Commit Creation: Saves the commit via the API with a 60-second timeout

Examples

Development Workflow

Release Process

Multiple Environment Commits

Commit Output

When you commit, you’ll see detailed information:
The output includes:
  • Commit ID: Unique identifier for this commit

Using HEAD VM

When no VM is specified, the command uses your current HEAD:

Error Scenarios

VM Not Found

Solution: Verify the VM ID/alias exists with vers status.

No HEAD Set

Solution: Use vers checkout <vm-id> to set a HEAD, or specify a VM explicitly.

Timeout

Solution: Commit operations have a 60-second timeout. Try again or check your network connection.

Tips

  • Commit before making risky changes to preserve known-good states
  • Use descriptive VM aliases to identify important snapshots later
  • You can restore from a commit using vers run-commit

Common Patterns

Commit and tag in one flow

Snapshot before a risky change

Promote one VM’s state to another

Commit a VM, then boot the commit on a fresh (possibly differently-sized) VM:

See Also