Darren Beale Web developer & early adopter

ArchiveJuly 2014

Halt all Vagrant/VirtualBox VMs one-liner

H

If you’re using Vagrant to control your dev VMs on a headless server it’s easy to lose track of the number of running machines.
Here’s a one-liner to gracefully shut-down all of them to free up some resources.
for VM in `VBoxManage list runningvms | awk ‘{ print $2; }’`; do VBoxManage controlvm $VM poweroff; done

Darren Beale Web developer & early adopter