Build an ephemeral AI code sandbox with Firecracker on Arm
Introduction
Understand the sandbox architecture
Prepare the Arm KVM host
Run code in a disposable microVM
Validate the execution boundaries
Next Steps
Build an ephemeral AI code sandbox with Firecracker on Arm
Review frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Check that
/dev/kvm exists on your Arm host. If you use a VM, ensure that it exposes nested virtualization and passes /dev/kvm through. Otherwise, use an Arm-based bare-metal server.The runner downloads
00-common.sh, run-job.sh, and demo.sh into sandbox/, and the example programs hello-arm.sh, write-marker.sh, and timeout.sh into sandbox/examples/.You should see the runner start a Firecracker microVM and execute the selected script inside the guest. For the default example, confirm
architecture=aarch64, cpus=1, outcome=succeeded, and exit_code=0. The kernel version and job identifier can vary.Run
write-marker.sh twice. Each job checks for /tmp/ai-sandbox-marker before creating it. Confirm that the second job doesn’t find the marker from the first job, because each job starts with a fresh copy of the base image.After the job exits, confirm that the
fc-ai0 TAP device is absent and that /opt/firecracker-ai/runtime contains no job directories. The reusable runner.lock file remains in the runtime directory.