Skip to main content
A VM’s name, ID, durable root, and published URLs belong to the persistent resource. Starting it again may create a new runtime, while retaining those identities.

Inspect state

list displays CPU, memory, configured root disk size, and uptime for the current running boot. get --json includes the specification, state, current container ID, and URLs. States include starting, running, stopping, stopped, paused, and error.

Stop and start

Stop saves the latest root contents before releasing compute and creates a filesystem snapshot artifact by default. Start cold-boots the saved filesystem. A command you launched manually does not rerun on a cold boot; install a systemd service if it should start automatically. --no-snapshot skips the named snapshot artifact, while still saving the durable root:

Pause and resume

Pause checkpoints memory and its paired disks, then shuts down the microVM. Resume restores those processes and memory. beam vm start also resumes a paused VM; resume is an alias for start. External network peers can close connections while the VM is paused. Applications should reconnect their database, API, and other external sessions after resuming. To keep the disk but explicitly discard paused RAM:
The Python equivalents are vm.stop(), vm.start(), vm.pause(), vm.resume(), and vm.start(cold=True).

Idle TTL and automatic resume

Unlike a sandbox lifetime, a VM TTL measures idle time. It does not delete the VM.
After 300 idle seconds, the default action saves the root and stops the VM. Set --idle-action pause to preserve RAM instead:
Automatic resume wakes a stopped or paused VM on an SDK operation that needs its runtime, authenticated tunnel access, or a permitted request to a published URL. Merely listing or inspecting the VM does not wake it. Without automatic resume, start it explicitly before executing commands or using a URL. Disable idle sleep or automatic resume separately:

What counts as activity?

Foreground CLI execution, SSH/tunnels, and active desktop or terminal WebSockets keep an activity lease. SDK access to processes or files updates activity. A command running inside the guest by itself is not a continuous activity signal. For a long Python operation on an idle-limited VM, hold a lease:
Detached commands and background coding agents do not keep the VM awake for their entire lifetime. Disable the TTL for unattended jobs, or keep an SDK activity lease open until the job finishes.

Python client lifetime and readiness

VM.get(name) resolves state without starting the machine. VM.connect(name) also starts or resumes it. create() and start() wait for exec readiness by default. Use wait(services=True) when you also need SSH, the terminal, and an enabled desktop to be ready.
close() and exiting a with VM... block release local client connections. They leave the VM running. Use stop(), pause(), or remove() to release compute.

Remove a VM

Removal deletes the VM and its root disk. Saved snapshot and template artifacts, additional named disks, and shared volumes are managed separately. Use beam vm snapshot rm and beam vm template rm to remove artifacts you no longer need.

Troubleshooting