Skip to content

Commit

Permalink
src/cmd-build: recreate /dev/kvm
Browse files Browse the repository at this point in the history
Different distros have different permissions on /dev/kvm. Recreate it
inside the container to ensure we don't hit ENOPERM.
  • Loading branch information
Andrew Jeddeloh authored and cgwalters committed Sep 12, 2018
1 parent 8d8765d commit be2bc7a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cmd-build
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ ostreesetup --nogpg --osname=coreos --remote=coreos --url=file:///mnt/ostree-rep
EOF

imageprefix=${name}-${version}-${image_genver}
# permissions on /dev/kvm vary by distro. Recreate it so we know it's what we expect
sudo rm -f /dev/kvm; sudo mknod /dev/kvm c 10 232 && sudo setfacl -m u:$USER:rw /dev/kvm
tail -F $(pwd)/install.log & # send output of virt-install to console
/usr/libexec/coreos-assembler/virt-install --dest=$(pwd)/${imageprefix}-base.qcow2 \
--create-disk --kickstart $(pwd)/local.ks --kickstart-out $(pwd)/flattened.ks \
Expand Down

0 comments on commit be2bc7a

Please sign in to comment.