Skip to content

Instantly share code, notes, and snippets.

@rdetert
Created August 3, 2011 06:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdetert/1122047 to your computer and use it in GitHub Desktop.
Save rdetert/1122047 to your computer and use it in GitHub Desktop.
Save the State of all your VirtualBox Virtual Machines. Great if you need to reboot remotely.
#!/bin/sh
VBoxManage list runningvms | awk '{split($0, a, " {"); gsub(/\"/,"", a[1]); print a[1]}' | xargs -I {} -t VBoxManage controlvm {} savestate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment