Skip to main content
A running sandbox can be suspended: its state is serialized to disk and reconstructed on demand when you resume it. Nothing keeps running in between — there is no daemon or background process to manage.
from vpod import Sandbox

with Sandbox.create() as sandbox:
    sandbox.commands.run("export SECRET=42")
    instance_id = sandbox.suspend()

# Later (even from a new process):
with Sandbox.resume(instance_id) as sandbox:
    result = sandbox.commands.run("echo $SECRET")
    print(result.stdout)  # 42

# Delete the suspended instance from disk when you no longer need it
Sandbox.destroy(instance_id)
Suspending only writes what changed since boot, which keeps the operation fast and the saved state small.

Managing instances

MethodDescription
sandbox.suspend()Suspend to disk, returns an instance ID
Sandbox.resume(id)Resume a suspended instance
Sandbox.list_instances()List all instances
Sandbox.destroy(id)Delete a suspended instance from disk
sandbox.close() shuts down a running sandbox but leaves suspended instances untouched — use Sandbox.destroy(id) to remove them from disk.