nestybox / nestybox/sysbox

/dev/kvm not accessible inside docker container when running with sysbox

Open
#717 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

New feature
Dominant language
Shell
Stars
3.9k
Forks
230
Avg merge
7h 48m
Merged PRs (30d)
3

Description

We need access to kvm in our docker machines to open android emulator instances.

We pass kvm to docker container via --device=/dev/kvm flag. This works fine without sysbox, but when --runtime=sysbox-runc is also present at container start, Android Emulator will not start, but it will complain that This user doesn't have permissions to use KVM (/dev/kvm).. User inside container is root.

Any idea what could cause this and how could we get it to work?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Android Emulator failure with Docker, --device=/dev/kvm, and --runtime=sysbox-runc, then inspect /dev/kvm access inside the container as root. Compare this with a container without Sysbox; done means the emulator can start under Sysbox with KVM access.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, docker
Domain
devops, infrastructure, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.