Skip to content

Instantly share code, notes, and snippets.

@dragon788
Last active May 19, 2016 00:19
Show Gist options
  • Save dragon788/a3b72197c82cf6a4de3f to your computer and use it in GitHub Desktop.
Save dragon788/a3b72197c82cf6a4de3f to your computer and use it in GitHub Desktop.
Vagrant check ports
# This works in Git Bash and Babun/Cygwin ZSH
# This could be created as more OS agnostic, currently it is hardcoded for VMware's Windows network config path
# This shows the entire vmnetnat config file for sanity checking
alias vmnetnat='cat C:/ProgramData/VMware/vmnetnat.conf'
# This shows all the ports that Vagrant has added to the VMware config
alias vagrantports='grep -A1000 "# VAGRANT-BEGIN" C:/ProgramData/VMware/vmnetnat.conf | grep -B1000 "# VAGRANT-END" | grep -v -G "VAGRANT"'
# This should only be used when VMware is closed, this deletes all the extra VMs that show up if you destroy/up a lot
alias vagrantpurge="rm C:/Users/$USER/AppData/Roaming/VMware/inventory.vmls"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment