Skip to content

Instantly share code, notes, and snippets.

@Pipeliner
Created March 15, 2012 23:43
Show Gist options
  • Save Pipeliner/2047682 to your computer and use it in GitHub Desktop.
Save Pipeliner/2047682 to your computer and use it in GitHub Desktop.
Костыль для одновременного запуска копий одной машины в VirtualBox | Script for VirtualBox to run multiple copies of VM simultaniously
#!/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