I've made the mistake of accidently removing VMs with Remove-VM
or Hyper-V Manager that I originally created with Vagrant.
This is a set of code snippets I'm using to help prevent that and make it easy to find all Vagrant created VMs, remove the ones I don't
need, then delete the boxes.
$oldpwd = $pwd ; gci -r Vagrantfile | %{ cd $_.Directory ; Write-Output "Checking status at $pwd" ; vagrant.exe status } ; cd $oldpwd
Other things I still need to do:
- Purge unused boxes
- Figure out how Vagrant refcounts things, if at all.
- Write something to walk Packer's cache so I can clean up unneeded ISOs