Clean a virtual box server

So at the company I work for these days we utilize a nifty vagrant setup that utilizes virtualbox for test kitchen.  Sometimes when jobs fail we get lingering vboxes just kinda sit around eating space until we’re alerted about it.  Here’s a command that we use to roll through our various build users and removes things that probably shouldn’t exist

find /home/*/VirtualBox\ VMs/ -mtime +5 | sed 's/VirtualBox\sVMs/VirtualBox\ VMs/g' | xargs rm -rf
for vm in `VBoxManage list vms| awk '{print $2}' |sed 's/[{}]//g'`; do VBoxManage unregistervm $vm; done

John T Skarbek

John T Skarbek
Im an Infrastructure Engineer at CA Technologies in the Agile Business Unit. Reading and using the latest and greatest of technology is what I want to be doing. Blogging is not something I do on any regular basis (and it shows).

Demonstrating Memory Behavior for AWS Lambda Function Freezing

AWS indicates that when a function is executed, there are some things that getleftover between runs. The execution environment, which AW...… Continue reading

Openshift v3 Deployment Strategy

Published on April 23, 2016

Haproxy URL Rewrite Logging Double Take

Published on May 29, 2015