Skip to main content
Vast.ai offers full virtual machines (VMs) in addition to Docker-based instances. VMs provide a complete Linux environment for workloads that require init managers, nested containerization, or process tracing.
VMs are in beta and are more limited than Docker-based instances. Choose a Docker-based instance unless your workload needs a VM.
  • Consumer GPUs only: VMs run only on consumer GPUs, such as the RTX 5090 and RTX 4090. Datacenter GPUs are not supported.
  • Slow to start: VMs with large amounts of RAM can take 30 minutes or more to start.
  • No Cloud Sync: data moves only by copying a whole VM to another VM.
  • More failed launches: VMs fail to launch more often than Docker-based instances.

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
VMs also come with these trade-offs:
  • Higher disk overhead
  • Fewer preconfigured templates
  • Only SSH launch mode is currently supported

Creating a VM

Make sure you have added your SSH keys to your Account page before creating a VM. SSH keys cannot be edited on running VMs, and SSH is currently the only supported connection method.
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:
Environment variables in VMs are written to /etc/environment.

Customizing VM Templates

VM images are packaged as Docker images from the docker.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).
Add vms_enabled=true to the Extra Filters field of the template to filter for machines that support VMs.

Docker Options

VM templates support the following flags in the Docker options field, which behave the same as in Docker-based instances: For more details on these options, see Docker Environment.

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 $DEST to copy between VMs. Note: vastai vm copy is not available as a CLI command.