compass-core/vagrant/destroy.sh
Xicheng Chang ea07256545 Make launch.sh idempotent
Change-Id: I9b3f989397c4c36ab3717d1cca84841778881186
2015-05-04 12:00:42 -07:00

15 lines
400 B
Bash
Executable File

#!/bin/bash
#
VBoxManage unregistervm controller --delete
VBoxManage unregistervm compute --delete
VBoxManage unregistervm network --delete
VBoxManage unregistervm storage --delete
vagrant destroy -f
hostonlyifs=$(VBoxManage list hostonlyifs|grep '\ vboxnet'| awk -F ' ' '{print $2}')
for hostonlyif in $hostonlyifs
do
VBoxManage hostonlyif remove $hostonlyif
done
rm -rf $HOME/VirtualBox VMs/*