Open verhulstm opened 6 years ago
I'd definitely benefit from this. I have a couple ideas.
I'd like a couple iterations of this, progressively aggressive. For instance, if we register Rambo VMs somewhere according to #123, then we can find them and delete them pretty easily and with precision. We can delete all VMs according to installation, according to user, that match some forensics (like the VM name containing 'rambo'). I'm not sure it's a good idea to really delete every VM that the user has, but we can if we want. That one might require double confirmation or something. Really, deleting anything that we don't register. It's pretty drastic.
Same with the vagrant boxes.
Also, I'm betting we can get a lot out of the VBoxManage / Vagrant commands, as opposed to doing manual file deletions. Perhaps more easily even since they should do some of there own cleanup. I haven't needed to delete a Vagrant box in ages (or ever?). For VBoxManage, the commands I use commonly are:
VBoxManage list vms
VBoxManage list runningvms
VBoxManage controlvm [uuid] poweroff
VBoxManage unregistervm [uuid] --delete
I want a command (something like "--reset-vbox") that:
resets networking in vbox.
This is a powerful and dangerous command so confirmation and/or requiring "-f" command to be passed in makes sense.