Skip to main content

vers pause

Pause a running VM to preserve its state while freeing up resources.

Synopsis

vers pause                           # Pause current HEAD VM
vers pause <vm-id>                   # Pause specific VM

Description

The pause command suspends a running VM, preserving its complete state (memory, filesystem, running processes) while freeing up computational resources. This is useful for temporarily stopping work on a VM without losing any progress.

Basic Usage

Pause Current VM

vers pause
Pauses whatever VM your HEAD is currently pointing to.

Pause Specific VM

vers pause vm-abc123
Pauses the specified VM directly.

What Happens When You Pause

When you pause a VM:
  • State Preserved: All memory, running processes, and open files are saved
  • Resources Released: CPU and active memory are freed up
  • Quick Resume: VM can be quickly resumed exactly where it left off
  • Network Disconnected: SSH connections are terminated but can be re-established after resume

Understanding Output

When pausing successfully:
vers pause vm-abc123
Pausing VM 'vm-abc123'...
 VM 'vm-abc123' paused successfully
VM state: Paused
This confirms:
  • Which VM was paused
  • The operation completed successfully
  • The current state of the VM

VM State Requirements

Can Pause

  • Running VMs can be paused
  • VMs with active SSH connections (connections will be terminated)
  • VMs with running processes (processes are suspended)

Cannot Pause

  • Already Paused VMs (no effect, but not an error)
  • Stopped VMs (different state, use resume for paused VMs)

Error Handling

VM Not Found

vers pause vm-nonexistent
# Error: failed to pause VM 'vm-nonexistent': not found

No Current VM

vers pause
# Error: no VM ID provided and HEAD not found
Solution: Run vers checkout to select a VM or provide specific VM ID.

Already Paused

vers pause vm-already-paused
# May show success but VM remains in paused state

Tips

  • Use vers status to see which VMs are paused
  • Pausing frees resources for other VMs to run
  • Long-running scripts will pause mid-execution and resume when VM resumes

See Also