Skip to content

Instantly share code, notes, and snippets.

@obazoud
Last active December 12, 2015 04:28
Show Gist options
  • Save obazoud/4714614 to your computer and use it in GitHub Desktop.
Save obazoud/4714614 to your computer and use it in GitHub Desktop.
#!/bin/bash
for vm in `VBoxManage list runningvms | awk '{ print $1 }' | sed "s/\"//g"`; do
VBoxManage controlvm "$vm" poweroff
done
for vm in `VBoxManage list vms | awk '{ print $1 }' | sed "s/\"//g"`; do
VBoxManage unregistervm --delete "$vm"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment