Skip to content

Instantly share code, notes, and snippets.

@jgarber
Created February 10, 2014 15:42
Show Gist options
  • Save jgarber/8918120 to your computer and use it in GitHub Desktop.
Save jgarber/8918120 to your computer and use it in GitHub Desktop.
Reset CloudStack fast
curl -Lo Vagrantfile http://git.io/Wt4DiQ
vagrant up
export VBOXID=`cat .vagrant/machines/default/virtualbox/id`
# Wait for it to come up and be ready.
VBoxManage snapshot $VBOXID take clean --live
# Make some VMs on CloudStack: http://10.0.123.101:8080/client/
time (VBoxManage controlvm $VBOXID poweroff && VBoxManage snapshot $VBOXID restorecurrent && VBoxManage startvm $VBOXID --type headless)
...
0.05s user 0.06s system 2% cpu 4.667 total
# And boom, it's back to its clean state and ready for new resources!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment