Created
September 20, 2017 04:15
-
-
Save lcherone/1eda50411442cd46189a01898f123c28 to your computer and use it in GitHub Desktop.
LXD stop all running containers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Stop all running containers | |
# | |
# stop running containers | |
for container in $(lxc list volatile.last_state.power=RUNNING -c n --format csv); do | |
lxc stop "$container" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment