Skip to content

Instantly share code, notes, and snippets.

@lcherone
Created September 20, 2017 04:16
Show Gist options
  • Save lcherone/a3d1cbdeabf8efffa07ede10f7da9425 to your computer and use it in GitHub Desktop.
Save lcherone/a3d1cbdeabf8efffa07ede10f7da9425 to your computer and use it in GitHub Desktop.
LXD Start all stopped containers
#!/bin/bash
#
# Start all stopped containers
#
# stop running containers
for container in $(lxc list volatile.last_state.power=STOPPED -c n --format csv); do
lxc start "$container"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment