diff options
Diffstat (limited to 'scripts/ci/docker')
| -rwxr-xr-x | scripts/ci/docker/setup_kvm.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/ci/docker/setup_kvm.sh b/scripts/ci/docker/setup_kvm.sh new file mode 100755 index 0000000..1ffbbf5 --- /dev/null +++ b/scripts/ci/docker/setup_kvm.sh | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #!/usr/bin/env bash | ||
| 2 | |||
| 3 | # This script makes the gid of the 'kvm' group to match the group | ||
| 4 | # owner of '/dev/kvm' | ||
| 5 | # | ||
| 6 | # These two are not guaranteed to match when a docker image starts | ||
| 7 | # with access to '/dev/kvm' that comes from the host | ||
| 8 | |||
| 9 | set -euo pipefail | ||
| 10 | |||
| 11 | kvm_gid=$(stat -c "%g" /dev/kvm) | ||
| 12 | groupmod -g "$kvm_gid" kvm | ||
| 13 | usermod -a -G kvm bitbake | ||
| 14 | ln -s /bin/true /usr/bin/kvm-ok | ||
