Repository navigation
Description
Summary
On OpenShell v0.1.10 with the vm (libkrun/KVM) driver, a sandbox created from an OCI image whose entrypoint is an executable shell script reaches Ready but the entrypoint cannot be executed: the workload fails with Permission denied (os error 13). The same image runs unchanged under Docker, and the same gateway runs a stock image without problem.
Environment
- OpenShell 0.1.10, Debian/Ubuntu package, gateway as a systemd user service,
compute_driver = "vm". - Host: Ubuntu 24.04 x86_64 on GCP
n2-standard-4with nested virtualisation;/dev/kvmpresent (crw-rw---- root:kvm), operator in thekvmgroup. - Gateway config (effective):
[openshell]
version = 2
[openshell.gateway]
compute_driver = "vm"
[openshell.drivers.vm]
default_image = "ghcr.io/mobileaffairsltd/dm-agentic-plane-instance@sha256:b1757ec2…"
vcpus = 2
mem_mib = 1536
enable_bind_mounts = true
allow_driver_config = true- The image is built with
COPY --chmod=0755 forwarder.py entrypoint.sh webapp_secrets.py /opt/andENTRYPOINT ["/opt/entrypoint.sh"], so/opt/entrypoint.shis executable inside the image.
Steps to reproduce
openshell sandbox create --name probe --detach --from <that digest>
→ sandbox reachesReady, then provisioning fails with:
process error: boundary process leaf: start process supervisor
spawn delegated workload process
failed to spawn sandbox entrypoint process '/opt/entrypoint.sh'
Permission denied (os error 13)
- Same image, but asking the sandbox to keep the shell alive and capturing the entrypoint's own error:
openshell sandbox create --name probe2 --detach \
--from <that digest> -- \
/bin/sh -c "/opt/entrypoint.sh > /tmp/entry.log 2>&1 & sleep 3600"
The sandbox reaches Ready and openshell sandbox exec probe2 -- /bin/sh -c 'head /tmp/entry.log' prints:
/bin/sh: 1: /opt/entrypoint.sh: Permission denied
- Control on the same gateway and host:
openshell sandbox create --name ok --detach \
--from nvcr.io/nvidia/base/ubuntu:24.04 -- sleep 3600
→ Ready, openshell sandbox exec works, /bin/sh and the rest of the image behave normally.
What we ruled out
- Not the gateway's
kvmaccess: with the group fix the microVM boots, the supervisor network comes up (NET:LISTEN :3128) and the sandbox becomesReady. - Not
allow_driver_config: it istrue; without it the create fails earlier, with a different message. - Not the image's mode bits: they are set by
COPY --chmod=0755, anddocker runexecutes the same file as PID 1. - Not the registry path specifically: we also tried a
docker exportrootfs tar (--from /path/rootfs.tar.gz), and the tar route fails the same way. Amain-branch-style/bin/sh -c '... & sleep'wrapper is the only way to keep such a sandbox alive.
Expected
An executable file in the image should be executable in the microVM: sandbox create should start the image's ENTRYPOINT, and an explicit -- /path/script should spawn.
Actual
EACCES on spawn, from both the image ENTRYPOINT path and an explicit command, while the sandbox still reports Ready.
Question / ask
Is the rootfs prepared for the vm driver expected to preserve file mode bits from the OCI layers (and from a staged rootfs tar)? If yes, this looks like a defect in rootfs materialisation or in how the supervisor mounts it — possibly noexec on the mount or modes normalised during extraction. If a workaround exists (a config key, or a documented way to supply an entrypoint as an interpreter command), we would take it: we are trying to run an agent runtime as a non-root user inside the microVM, and this is the only thing blocking a production pilot.
Happy to provide the image digest, the full gateway journal, and re-run any diagnostic you want on the host.
Activity
xman892 commentedon Dec 2, 2026
Follow-up evidence from the host, which narrows this to filesystem confinement rather than file modes.
Inside a sandbox created from the image (
-- /bin/sh -c 'sleep 3600'), the workload runs asuid=1000(hermes) gid=1000(hermes), and the files are world-readable and world-executable:Yet reading them is denied:
lson/optworks, and the mode string reportso+rx, so DAC alone does not explain it. Combined with the fact that executing the same file also returns EACCES, this looks like an LSM or a filesystem allowlist applied to the workload process (Landlock/AppArmor/seccomp-style) that does not include/opt— or an ownership mismatch: the image files are extracted as1001:1002while the process runs as1000.Is
/optexpected to be readable by the sandbox user? If the supervisor applies a path allowlist, which paths does it cover, and is there a supported way to declare additional read-only paths (for example the documentedenable_bind_mountsvirtiofs mount, which we have enabled but have not exercised yet)? If the extraction owner is the issue, is running the image's ownUSERsupported?Reproducer unchanged:
openshell sandbox create --name ep --detach --from <digest> -- /bin/sh -c 'sleep 3600'thenopenshell sandbox exec ep -- /bin/sh -c 'ls -l /opt; head -c 40 /opt/forwarder.py'.xman892 commentedon Dec 2, 2026
Correcting my earlier LSM theory — the evidence now points at UID/GID remapping during rootfs staging, and I can show it against Docker as ground truth on the same image.
Docker, same image, same host (
docker run --rm --entrypoint /bin/sh <image> -c 'id; stat -c "%u:%g %A %n" …'):In the microVM, same image, same files:
Every path is shifted to
1001:1002while the workload still runs as1000. Consequences:/home/hermesis0700and now owned by 1001, so the workload cannot enter it:cannot create /home/hermes/t.sh: Permission denied./opt/entrypoint.shkeepso+rxbut is still refused on read and exec, which is the part I cannot explain by DAC alone — unless the shift also affects the overlay's upper/lower layers.Questions:
+1 uid / +2 gidshift during staging intentional (rootless/uid-mapping for libkrun)?USERagree — should we build the image expecting the shifted ids?EACCESon/optand the unusable home directory.Reproducer is two commands:
docker run --rm --entrypoint /bin/sh <image> -c 'stat -c "%u:%g %n" /opt/entrypoint.sh /home/hermes'versusopenshell sandbox exec <sandbox> -- /bin/sh -c 'stat -c "%u:%g %n" /opt/entrypoint.sh /home/hermes'on v0.1.10 with thevmdriver.