Created
March 15, 2012 23:43
-
-
Save Pipeliner/2047682 to your computer and use it in GitHub Desktop.
Костыль для одновременного запуска копий одной машины в VirtualBox | Script for VirtualBox to run multiple copies of VM simultaniously
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/sh | |
src=SrcMachine | |
dst=DstMachine | |
case $1 in | |
start) | |
VBoxManage startvm $src | |
VBoxManage startvm $dst | |
;; | |
stop) | |
VBoxManage controlvm $src acpipowerbutton | |
VBoxManage controlvm $dst acpipowerbutton | |
;; | |
commit) | |
msg=$2 | |
VBoxManage unregistervm $dst --delete | |
VBoxManage snapshot $src take "$msg" | |
VBoxManage clonevm $src --snapshot "$msg" --options link --name $dst --register | |
;; | |
*) echo gyys | |
esac | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment