Skip to Content
Spunto Sandbox

Configuration

Every setting of the daemon and the engine.

Settings are environment variables of the daemon: put them in /etc/spunto-sandbox/sandboxd.env (KEY=value, one per line, no quotes) and sudo systemctl restart spunto-sandboxd — sandboxes keep running across a restart. Running VMMs get new CPU and network limits at the restart; memory settings apply to the next admissions.

The daemon (SBX_*)

VariableDefault
SBX_SOCKET/run/spunto-sandbox.sockthe API's unix socket
SBX_SOCKET_GROUPspunto-sandboxthe group that may use it (mode 660); unset or missing: root only
SBX_LISTEN—also listen on TCP: 0.0.0.0:7070 (needs SBX_API_TOKEN)
SBX_API_TOKEN—the bearer token TCP requests need
SBX_STATE_DIR/var/lib/spunto-sandboxthe daemon's own state
SBX_DEFAULT_SIZEsmalla box's size when none is given
SBX_CREATE_TIMEOUT_MS900000how long a create waits for its box (a large image's first pull)
SBX_AGENT_FILE—another guest agent binary than the one installed
SBX_LOG_REQUESTS—1: a log line per request

The CLI and the SDK read SBX_HOST (unix:///run/spunto-sandbox.sock, or http(s)://host:port) and SBX_TOKEN.

The engine (SPUNTO_FC_*)

Where things are

VariableDefault
SPUNTO_FC_DATASETdefault/spunto (the installer sets it)the ZFS dataset everything goes under
SPUNTO_FC_OPT/opt/spunto-fcbinaries and kernels
SPUNTO_FC_STATE/var/lib/spunto-fcthe registry, memory mounts, jails
SPUNTO_FC_RUN/run/spunto-fcVMM exit records
SPUNTO_FC_SLICEvms.slicethe systemd slice of every VMM: its MemoryMax is the boxes' budget
SPUNTO_FC_KERNELthe pinned kernelboot another kernel (a test, a local build)
SPUNTO_FC_UPLINKthe default route's devicethe interface boxes go out through

Sizes and disks

VariableDefault
SPUNTO_FC_ROOT_SIZEby size: 40, 40, 50, 60 GBone system disk size for every box
SPUNTO_FC_IMAGE_SIZE10Gthe filesystem an image is unpacked into (each box's clone is grown)
SPUNTO_FC_WORKSPACE_SIZE20Ga new box's /workspace
SPUNTO_FC_MAX_ROOT_GB / SPUNTO_FC_MAX_WS_GB200 / 500what grow accepts, at most
SPUNTO_FC_MIN_POOL_FREE_GB5below this left in the pool, no new box and no new memory file
SPUNTO_FC_MEM_RECORDSIZE64Kthe recordsize of memory datasets

Memory

VariableDefault
SPUNTO_FC_ADMITon0: no memory admission at all
SPUNTO_FC_ADMIT_MIN_MB1024the least real room a box needs to start (else an eighth of its RAM)
SPUNTO_FC_OVERCOMMIT1.5how far the boxes' announced RAM may exceed the slice (0: no limit)
SPUNTO_FC_ADMIT_HOLD_MS30000how long an admission holds its room for a box that is starting
SPUNTO_FC_FREE_PAGE_REPORTINGon0: no balloon, freed guest memory stays resident
SPUNTO_FC_INIT_ON_FREEoff1: the guest zeroes freed pages (touches every page at boot)

CPU and network

VariableDefault
SPUNTO_FC_CPU_LIMITSon0: no CPU quota nor weight
SPUNTO_FC_CPU_MARGIN0.5cores on top of a box's vCPUs, for its VMM's threads
SPUNTO_FC_CPU_WEIGHT100every box's weight; vcpu for 100 per vCPU
SPUNTO_FC_NET_LIMITSon0: no shaping
SPUNTO_FC_NET_MBIT200a box's ceiling, each way
SPUNTO_FC_NET_TOTAL_MBIT95 % of the linkwhat all boxes share equally when full
SPUNTO_FC_SMTPclosedopen: port 25 open for every box
SPUNTO_FC_SMTP_ALLOW—sandbox ids (comma-separated) that may use port 25

Guests and VMMs

VariableDefault
SPUNTO_FC_JAILERon0: VMMs as root, without the jailer — a comparison, never on a shared machine
SPUNTO_FC_UID_BASE2000000000the jailed VMMs' uids start here
SPUNTO_FC_KERNEL_EXTRA_ARGS—more guest kernel arguments (a=b c)

Two daemons on one machine

A second engine (a test next to a real one) needs its own SPUNTO_FC_STATE, SPUNTO_FC_RUN, SPUNTO_FC_DATASET, SPUNTO_FC_SLICE, SPUNTO_FC_NET_FIRST (its networks start there, e.g. 1000), SPUNTO_FC_IFB (another IFB prefix) and SPUNTO_FC_JAIL_DIR, and a daemon of its own (SBX_SOCKET, SBX_STATE_DIR).

On this page