scripts/preflight-check.sh first; it reports most of these before they bite. For the steps behind each fix see Manual host setup.
Setup and permissions
scripts/setup.shfails with “a terminal is required to read the password”. It ran non-interactively (for examplessh host 'cmd'rather than an interactive session) and one of itssudosteps had no TTY to prompt on. Run it from a real interactive shell, or runsudo -vfirst to cache credentials in that session before invoking it non-interactively.- A rebuild-then-restart over SSH cannot prompt for sudo. Run
sudo scripts/host-setup/allow-passwordless-cap-grant.shonce, interactively, sosandkilnd-ctl.sh restartcan grantCAP_NET_ADMINunattended. /dev/kvm: permission denied.sudo usermod -aG kvm $USER, then log in again; group membership does not apply to an already-open session.- “Operation not permitted” on any network call. You rebuilt the daemon and are running it directly, not under the systemd unit, and did not re-run
sudo scripts/host-setup/grant-net-admin.sh core/target/release/sandkilnd. Capabilities do not survive a rebuild;sandkilnd-ctl.shand the systemd unit handle it. See Capabilities. preflight-check.sh --root-checksreports missing binaries you know are installed. You ran it with plainsudo, which resets$HOMEto/rootand breaks every~/sandkiln-tools/...default path. Usesudo -Eto preserve your environment.
Startup
tap devices missing: [...] — run scripts/host-setup/create-tap-pool.sh firstat startup.tap_pool_prefixortap_pool_size(SANDKILN_TAP_POOL_PREFIXandSANDKILN_TAP_POOL_SIZE) do not match what you created, or the pool was created for a different user than the daemon runs as.
Sandboxes
- Creating or resuming a sandbox returns
503“no free tap devices left in the pool”. Every tap is plugged into a running sandbox (held snapshots do not use one).GET /statusshowstap_pool.in_use; stop sandboxes you no longer need, or raisetap_pool_sizeafter re-runningcreate-tap-pool.sh. If the message is “no free IPs left in the sandbox subnet” instead, held snapshots are the cause: each keeps one of the 253 addresses, andip_pool.held_by_snapshotssays how many. Delete snapshots you will not resume. - Create works, but
exec,read-fileorwrite-filetime out or fail with a vsock connect error. The guest agent is not baked into the rootfsbase_rootfspoints at. Runsudo -E scripts/preflight-check.sh --root-checksto confirm, then see Base image and guest agent. - A plain
execreturns504. If the body has"timed_out": true, the command ran past itstimeout_secs(defaultexec_timeout_secs, 600) and the guest killed it; the body carries the partial output, and a largertimeout_secs(up toexec_timeout_secs, which you can raise) or streamed exec is the way to run it longer. A504withouttimed_outmeans the guest did not answer at all: the command may still be running, most often because the guest agent in the image predatestimeout_secsand needs re-injecting. execreturns exit code127or126with a one-line message onstderr. The command could not start:127means it was not found (command not found, orNo such file or directoryfor a path),126means it exists but is a directory, lacks the execute bit or is not a loadable binary. It is the shell convention, not a daemon fault; install the program in the image or fix the path. A500“unexpected agent response: No such file or directory” on exec means the guest agent in the image predates this behaviour and needs re-injecting.- A remote storage mount returns
400“remote storage mounts need the rclone binary…” or “…no /dev/fuse”. The sandbox image has norclone(seeimages/inject-rclone.sh), or the guest kernel was built withoutCONFIG_FUSE_FS(seeimages/build-guest-kernel.sh). Use a FUSE-capable kernel and an image with rclone injected. - Sandboxes boot but have no outbound network. Confirm
uplink_ifacedetected the right interface (ip route show default), and that the DNS forwarder is running (systemctl status sandkiln-dnsmasq, orscripts/host-setup/start-dns-proxy.shby hand). Outbound IP connectivity and DNS resolution are independent failure modes, so check both.
Production image build
- debootstrap fails on an unknown codename. Your host’s
debootstrapdoes not yet know the Ubuntu releasebuild-universal-image.shdefaults to. Eitherapt-get install --only-upgrade debootstrap, or pass an older LTS codename explicitly as its third argument (the script’s header comment has the exact command). - Disk fills up during the build. It needs several GiB free for the whole build (the sparse image itself plus package downloads inside the chroot). Free space first rather than letting it fail partway. The script cleans up a partial image on failure, but that does not reduce the headroom the next attempt needs.
Jailer
- Sandbox creation fails with a jailer-related error after enabling
jailer_enabled. Almost always the setuid bit on thejailerbinary. Checkls -la ~/sandkiln-tools/bin/jailershows-rwsr-xr-xowned byroot, and re-applychown root:rootandchmod u+sif you re-raninstall-firecracker.shsince. If it is set correctly and the jailer still fails, checkmount | grep cgroup2: the jailer is invoked with--cgroup-version 2unconditionally and fails on a host still using the legacy cgroups v1 hierarchy. See Jailer setup. 400 snapshotting a jailed sandbox is not supported yet. Expected. Stop the sandbox instead of snapshotting it if you do not need to resume it.