Skip to content

Instantly share code, notes, and snippets.

@markbirbeck
Created July 12, 2011 13:07
Show Gist options
  • Save markbirbeck/1077939 to your computer and use it in GitHub Desktop.
Save markbirbeck/1077939 to your computer and use it in GitHub Desktop.
Dealing with a broken Vagrant instance

Sometimes we get to a point where a Vagrant VM just won't run, and there's nothing for it but to get rid of it.

First get the ID of the machine in question:

cat .vagrant

Output will be something like:

{"active":{"hadoop_client":"31c1a009-f1b0-4acc-8200-1f33b95a0e3b"}}

To find out which directory this VM is using, do:

vboxmanage list vms

Output will be something like:

"vagrant_1310474995" {31c1a009-f1b0-4acc-8200-1f33b95a0e3b}

Now ask VBox to shut the instance down (Vagrant can't manage it) and unregister the VM:

vboxmanage controlvm {31c1a009-f1b0-4acc-8200-1f33b95a0e3b} poweroff
vboxmanage unregistervm {31c1a009-f1b0-4acc-8200-1f33b95a0e3b}

You can now delete the directory vagrant_1310474995 and start again with a fresh instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment