Vast.ai offers full virtual machines (VMs) in addition to Docker-based instances. VMs provide a complete Linux environment, making them ideal for workloads that require init managers, nested containerization, or process tracing.Documentation Index
Fetch the complete documentation index at: https://docs.vast.ai/llms.txt
Use this file to discover all available pages before exploring further.
Feature Comparison
VMs offer capabilities not available in Docker-based instances:- Init manager support (e.g.,
systemd), required for running Docker, Kubernetes, Snap, or other containerization tools inside your instance - Process tracing (
ptrace) support
- Slower creation and boot times
- Higher disk overhead
- Smaller selection of available machines
- Fewer preconfigured templates
- Only SSH launch mode is currently supported
Creating a VM
Use one of the templates below to get started. These templates automatically filter for VM-capable machines and will launch a VM when you rent:| Template | Description | Provides | Use Cases |
|---|---|---|---|
| Ubuntu 22.04 VM | Ubuntu 22.04 server with CLI access | CUDA, Docker | Docker Compose applications, CUDA performance profiling |
| Ubuntu Desktop (VM) | Ubuntu desktop with a graphical environment | CUDA, Docker | GUI applications, visual development workflows |
Environment variables in VMs are written to
/etc/environment.Customizing VM Templates
VM images are packaged as Docker images from thedocker.io/vastai/kvm repository. All VM templates must use one of these images, specified with the fully qualified name (e.g., docker.io/vastai/kvm:ubuntu_terminal).
Docker Options
VM templates support the following flags in the Docker options field, which behave the same as in Docker-based instances:| Option | Example | Description |
|---|---|---|
| Environment variables | -e JUPYTER_DIR=/ -e TEST=OK | Written to /etc/environment inside the VM |
| Ports | -p 8081:8081 -p 8082:8082/udp | Expose additional ports |
Launch Modes
Currently only SSH is supported. See the SSH guide for connection details.Differences from Docker-Based Instances
- Data copy: The cloud copy utility for VMs only supports migrating the entire VM, individual folder copies are not available.
- Copy scope: Copy is only supported between two VMs, not between VMs and external cloud storage providers.
- Copy command: Use
vastai copy $SRC $DESTto copy between VMs. Note:vastai vm copyis not available as a CLI command.