Skip to content

Linux firecracker: sudo password requirement blocks first boot #9

Description

@clanghans

Setup & Reproduction

System: Linux x86_64 (Arch Linux)
VM provider: firecracker
User: non-root, standard sudo config (requires password)

Installed clawk from source, ran clawk doctor — all prereqs passed:

[OK]   host: os/arch — linux/amd64
[OK]   host: go toolchain — on PATH
[OK]   host: firecracker — on PATH
[OK]   host: /dev/kvm — readable/writable

Then: clawk in project directory.

Errors Encountered

First: losetup requires sudo password

preparing VM: baking worktree: losetup --find /home/chris/.clawk/.../rootfs.raw: exit status 1 (sudo: a password is required)

Second: network bridge setup also requires sudo password

FATAL: building spec: bridge: sudo ip link add name clawkbr0 type bridge: exit status 1 (sudo: a password is required)

Attempted workaround sudo -v && clawk does not work — sudo cache expires before clawk completes all privileged operations.

Security Concern

The only working solution requires passwordless sudo:

chris ALL=(ALL) NOPASSWD: /sbin/losetup, /sbin/ip

This grants the user broad network reconfiguration access, which conflicts with the goal of sandboxing—isolating agents from the host.

Questions

  1. Does sudo clawk work? Can clawk be run with elevated privileges once and reuse that context for all nested operations?

  2. Rootless firecracker support? Does firecracker have a rootless mode that avoids losetup/ip privilege requirements?

  3. Is this a known limitation? Is passwordless sudo for network commands the expected setup for experimental Linux firecracker support?

We want to use clawk for agent sandboxing, but need a solution that doesn't compromise host security.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions