vers commit
Save the current state of a VM as a commit with optional tagging.Synopsis
Description
Thecommit 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
Commit Specific VM
Tagging Commits
Single Tag
Multiple Tags (Repeated Flag)
Multiple Tags (Comma-Separated)
Combining Both Flag Types
What Happens During Commit
- VM Identification: Resolves the target VM (provided or HEAD)
- Tag Processing: Combines all tags from both flag types
- State Capture: Creates a snapshot of the VM’s current state
- 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:- Commit ID: Unique identifier for this commit
- Cluster ID: The cluster containing the VM
- Host Architecture: System architecture (e.g., x86_64, arm64)
- Tags: All applied tags
Using HEAD VM
When no VM is specified, the command uses your current HEAD:Error Scenarios
VM Not Found
vers status or vers tree.
No HEAD Set
vers checkout <vm-id> to set a HEAD, or specify a VM explicitly.
Timeout
Flags
--tag, -t
Add individual tags to the commit. Can be repeated multiple times:
--tags
Add multiple tags as a comma-separated list:
Tag Best Practices
- Version tags:
v1.0.0,v2.1-beta - Status tags:
stable,testing,production - Feature tags:
auth-complete,ui-redesign - Environment tags:
dev,staging,prod - Date tags:
2024-01-15,weekly-backup
Common Patterns
Milestone Commits
Environment Promotion
Backup Strategy
Tips
- Use descriptive tags that explain the purpose of the commit
- Combine version numbers with status tags for clarity
- Commit before making risky changes to preserve known-good states
- Tags help you identify important snapshots later
See Also
- vers checkout - Switch between VMs to commit different ones
- vers status - See available VMs and current HEAD
- vers branch - Create new VMs from committed states