Skip to content

Instantly share code, notes, and snippets.

@biera
Last active September 18, 2016 22:57
Show Gist options
  • Save biera/cbd24ac4c4df73e43e95 to your computer and use it in GitHub Desktop.
Save biera/cbd24ac4c4df73e43e95 to your computer and use it in GitHub Desktop.
halt all running vagrant boxes
vagrant global-status | awk '$3 == "running"{print $4}' | xargs -I '{}' sh -c 'cd "$1" && vagrant halt'
@bradiosd
Copy link

Hey @biera, this does not seem to work anymore on Vagrant 1.8.5. I tried changing the script slightly but not advanced enough on command line to know what's really going on with this one liner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment