Last active
August 29, 2015 13:57
-
-
Save willgarcia/77a40e51762771946993 to your computer and use it in GitHub Desktop.
vboxmanage unregister vms by id
This file contains hidden or 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
vboxmanage list vms | awk '{print $2;}' | xargs -I vmid VBoxManage unregistervm vmid --delete | |
VBOXID=$(vboxmanage list vms | grep packer | awk '{ print $2 }') | |
vboxmanage controlvm $VBOXID poweroff ; vboxmanage unregistervm $VBOXID --delete ; rm ~/VirtualBox\ VMs/packer-virtualbox-iso/* -rf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment