set_start_cmd() configures a command that starts during template build before
snapshotting. Readiness probes tell Nullspace when that command is ready, then
sandboxes created from the template restore the snapshotted running state
instead of rerunning the command.
Create-time Sandbox.create(envs=...) values are not visible to the template
start command. Use set_runtime_envs() for runtime defaults that should be
present in launched sandboxes.
For warm pools, treat the template start command and readiness probe as the
complete service boot contract. A pooled sandbox may restore an already-ready
VM, so service startup must not depend on create-time envs, volume mounts, cwd
overrides, desktop settings, or per-create networking options.
Start command
Readiness helpers
wait_for_url() is an in-guest local HTTP readiness probe. It accepts only
http:// URLs on localhost, 127.0.0.1, or 0.0.0.0, requires an explicit
port, and rejects query strings, fragments, and embedded credentials.
Concept: Create. API reference:
buildTemplate, getTemplateBuildStatus.