Guide

File Operations

Upload and download files to running VMs

vmsan lets you transfer files to and from running VMs without SSH.

Upload files

Copy one or more local files into a running VM:

# Upload a single file to /root (default destination)
vmsan upload <vm-id> ./local-file.txt

# Upload multiple files
vmsan upload <vm-id> ./app.js ./package.json

# Upload to a specific directory
vmsan upload <vm-id> ./app.js ./config.json -d /app

Files are sent to the in-VM agent over HTTP. The -d/--dest flag sets the destination directory inside the VM (defaults to /root).

Download a file

Copy a file from a running VM to your local machine:

# Download to current directory (uses remote filename)
vmsan download <vm-id> /app/output.log

# Download to a specific local path
vmsan download <vm-id> /app/output.log -d ./logs/

The -d/--dest flag sets the local destination path. If omitted, the file is saved to the current directory using the remote file's basename.

Use cases

  • Deploy application code into a sandboxed VM
  • Extract logs or build artifacts from a running VM
  • Stage configuration files before starting a service
Copyright © 2026