Skip to main content

The root filesystem is durable

A VM’s writable root is backed by a durable disk. Persistence includes installed software and files throughout the root, such as /usr, /etc, /root, /workspace, and Docker’s data under /var/lib/docker. You do not need to confine persistent files to a special workspace directory. Runtime mounts such as /proc, /sys, /dev, and /run are runtime state, rather than persistent application files. Volumes and additional disks are separate mounted storage. For example, install tools and a Python environment, then stop and restart:

Disk capacity

The default is 50 GiB of writable capacity over the base image. Set --disk-size or disk_size at creation, up to 100 GiB:
The guest sees an ext4 filesystem with a real capacity. Usable space reported by df is lower than the configured capacity because of filesystem metadata and overhead; a 100 GiB disk can display about 98 GiB. The configured disk size also appears in the VM list and specification.

Read, write, and transfer files

VMs use the same filesystem API as sandboxes:
See the filesystem guide for directories, file metadata, search, replacement, and byte operations. Use vm.aio.fs for async filesystem calls. For local directories and SSH file transfer, see SCP and sync.

Save a filesystem snapshot

Snapshots are reusable filesystem restore points. They do not include RAM or running processes; use pause for that.
Snapshot creation leaves the VM available in its current lifecycle state. Finish writes and quiesce applications that require an application-consistent backup before capturing a restore point.

What a snapshot includes

A VM snapshot artifact captures the root disk and the VM’s configuration. It is not a backup of every mounted dataset.
  • Additional named durable disks keep their separate identities and persistence rules.
  • Shared volumes keep their shared contents and are not copied into the root snapshot.
  • A fork or template launch inherits those mount references unless you override them in the SDK. Root files are independent; externally mounted data may still be shared.
  • A writable additional disk can have only one active writer. Stop its current owner or supply a different disk when launching another VM that uses it.
For additional-disk backups and independent datasets, use the durable disk and volume APIs explicitly.

Restore into a new VM

Use the snapshot’s ID from snapshot create or snapshot list to create a new VM from that point in time:
This creates a new identity and new URLs. It does not overwrite the source VM. Choose the snapshot ID explicitly to restore historical contents; starting the original VM uses its latest saved root.

Fork the current root

The new VM boots from the source’s captured root, with an independent root disk, VM ID, and service URLs. Changing its root files does not change the source. Forking does not clone the source’s RAM or active connections.

Reusable private templates

Templates save a root and configuration for launching multiple environments:
Templates are private to the workspace. Public VM templates are unsupported. Roots can contain credentials and application data: remove anything you do not want future environments to inherit before saving a template.

Clean up restore points

Deleting an artifact removes that reusable restore point. It does not remove VMs already created from it. Manage VM deletion separately with beam vm rm NAME.