Skip to content

Instantly share code, notes, and snippets.

@ivan
Created January 8, 2018 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivan/33d9bd1532e8427eacb15e27c638d77f to your computer and use it in GitHub Desktop.
Save ivan/33d9bd1532e8427eacb15e27c638d77f to your computer and use it in GitHub Desktop.
exercise-lxc
#!/bin/bash
# Script to make sure unprivileged LXC containers actually work
# and don't lock up the kernel, systemd, etc.
# https://github.com/lxc/lxc/issues/1403
umask 000
for i in {1..10}; do
lxc-create -t download -n deleteme-$i -- -d debian -r stretch -a amd64
done
while true; do
for i in {1..10}; do
lxc-start -n deleteme-$i &
done
wait
sleep 1
for i in {1..10}; do
lxc-stop -n deleteme-$i &
done
wait
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment