-
-
Save jeremylenz/723e00bf43e36c1249fee246da724ce4 to your computer and use it in GitHub Desktop.
vagrant/virsh snapshot commands bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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