Skip to content

Instantly share code, notes, and snippets.

@jeremylenz
Forked from johnpmitsch/blah.sh
Last active January 31, 2020 19:44
Show Gist options
  • Save jeremylenz/723e00bf43e36c1249fee246da724ce4 to your computer and use it in GitHub Desktop.
Save jeremylenz/723e00bf43e36c1249fee246da724ce4 to your computer and use it in GitHub Desktop.
vagrant/virsh snapshot commands bashrc
# Add to your ~/.bashrc, then run source ~/.bashrc
# virsh-snapshot-create mybox mysnap
# Run in forklift directory
function virsh-snapshot-create {
vagrant halt $1
virsh snapshot-create-as forklift_$1 $2
vagrant up $1
}
# virsh-snapshot-list mybox
function virsh-snapshot-list {
virsh snapshot-list forklift_$1
}
# virsh-snapshot-revert mybox mysnap
function virsh-snapshot-revert {
virsh snapshot-revert forklift_$1 $2
}
# sat-deploy-snapshot-create mybox mysnap
# Run in sat-deploy directory
function sat-deploy-snapshot-create {
vagrant halt $1
virsh snapshot-create-as sat-deploy_$1 $2
vagrant up $1
}
# sat-deploy-snapshot-list mybox
function sat-deploy-snapshot-list {
virsh snapshot-list sat-deploy_$1
}
# sat-deploy-snapshot-revert mybox mysnap
function sat-deploy-snapshot-revert {
virsh snapshot-revert sat-deploy_$1 $2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment