Skip to content
Snippets Groups Projects
Commit d29cc85f authored by MJB's avatar MJB
Browse files

deleting VMs using vboxmanage rather than vagrant destroy

parent be98eea4
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
vboxmanage list vms | awk '{print $1} ' | awk -F',' '{gsub(/"/, "", $1); print $1}' > runningvms
vboxmanage list vms | awk ' {print $1} ' | awk -F',' '{gsub(/"/, "", $1); print $1}' > runningvms
while read vm_id; do
echo $vm_id
vboxmanage controlvm $vm_id poweroff
vboxmanage unregistervm $vm_id --delete
done <runningvms
done <runningvms
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment