Created
February 19, 2013 21:48
-
-
Save pettazz/4990397 to your computer and use it in GitHub Desktop.
Updated reset_vms version to use qemu qcows instead of VirtualBox
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
#!/bin/bash | |
function reset_vm { | |
echo "resetting $1..." | |
cd /home/pettazz/VMs/ | |
if [ -a $1.pid ] | |
then | |
echo "killing existing VM pid:" | |
echo `cat $1.pid` | |
echo -e "\n" | |
kill -9 `cat $1.pid` | |
rm $1.pid | |
fi | |
rm $1Active.qcow | |
cp -v $1Base.qcow $1Active.qcow | |
kvm -m 2048 -usbdevice tablet -hda $1Active.qcow -vga std -redir tcp:$2::$2 > $1.log & | |
echo $! > $1.pid | |
echo -e "done.\n\n\n" | |
} | |
reset_vm "Win7ie8" 5555 | |
reset_vm "Win7ie9" 5556 | |
reset_vm "Win7ffchrome" 5557 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment