Skip to main content

Volumes Workflow

This guide walks through the full volume lifecycle: create, transfer files, checkpoint, mount on new/existing VMs, unmount, and cleanup.

Prerequisites

pip install instavm    # Python SDK + CLI
# or
npm install instavm # JavaScript SDK

You need a valid API key from the InstaVM Dashboard.

1) Create a volume

instavm volume create project-data --quota 10gb

2) Upload, list, download, and delete files without mounting

# Upload
instavm volume files upload <volume_id> ./README.md \
--path docs/README.md --overwrite

# List
instavm volume files ls <volume_id> --prefix docs/

# Download
instavm volume files download <volume_id> docs/README.md

# Delete
instavm volume files rm <volume_id> docs/README.md

3) Create and manage checkpoints

# Create
instavm volume checkpoint create <volume_id> --name pre-release

# List
instavm volume checkpoint ls <volume_id>

# Delete
instavm volume checkpoint rm <volume_id> <checkpoint_id>

4) Mount on a newly created VM

instavm create --volume <volume_id>:/data:rw

5) Hot-plug on an existing/running VM

Use the same mount API against an already-running VM.

# Mount on an already-running VM
instavm create --volume <volume_id>:/mnt/hotplug:rw

6) Unmount and cleanup

Unmount requires mount_path.

# Delete the volume (unmount happens automatically)
instavm volume rm <volume_id>

Important flags and when to use them

FlagWhereWhy it matters
refresh_usagevolumes.list/getRefreshes usage metrics before returning
overwriteuploadControls replacement behavior for existing file path
prefixlist filesRestricts list scope to a subtree
recursivelist filesIncludes nested paths when true
limitlist filesCaps result count per list call
modemountrw or ro access mode
checkpoint_idmountAttach using a specific checkpoint context
waitmount/unmount/create vmBlock until operation completes
mount_pathmount/unmountIn-VM path; required for unmount

Operational notes

  • Keep mount paths explicit and consistent (/data, /mnt/cache, etc.).
  • Use checkpoints before destructive writes.
  • Keep volume quotas aligned with workload expectations to avoid write failures.
  • Treat volumes as durable file storage, not as managed transactional databases.

Next steps