Skip to content

Instantly share code, notes, and snippets.

@mkouhei
Created August 23, 2017 22:18
Show Gist options
  • Save mkouhei/c5a0ad9cd3d34f3c62aa7208fdefeb5d to your computer and use it in GitHub Desktop.
Save mkouhei/c5a0ad9cd3d34f3c62aa7208fdefeb5d to your computer and use it in GitHub Desktop.
#!/bin/sh -e
vmname=$1
VBoxManage showvminfo $vmname | grep State: | grep -q 'powered off' || ( echo "VM: $vmname is not powered off."; exit 1 )
VBoxManage clonevm --mode machine --options keepallmacs --name "${vmname}_tmp" --register
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment