Vagrant error: Your VM has become inaccessible.

If you’ve deleted a virtual machine file still referenced by one of your projects, you’ll run into the following error when you try and instantiate the VM via vagrant up.

Your VM has become “inaccessible.” Unfortunately, this is a critical error with VirtualBox that Vagrant can not cleanly recover from. Please open VirtualBox and clear out your inaccessible virtual machines or find a way to fix them.

Vagrant creates a hidden folder within your project directory named .vagrant with files that refer to specific VM IDs.

.vagrant

Simply delete the .vagrant folder within your project and rerun vagrant up. Vagrant will rebuild the .vagrant directory with the correct files and ID.

For giggles, here’s a Github issue page regarding this with a few more details.

This entry was posted in Code, Devops, Vagrant, Virtualization. Bookmark the permalink.

42 Responses to Vagrant error: Your VM has become inaccessible.

  1. aruljeeva says:

    this is good solution

  2. John says:

    thank you!

  3. Naim says:

    Yeah. It worked like a charm for me too.
    Way better than destroying my VM 😛

  4. Pingback: Vagrant error: Your VM has become inaccessible. » Doodlebobbers | Chaosplay

  5. Elena says:

    Saved my day! Thanks 🙂

  6. Mohit says:

    Thanks a lot man!

  7. Miles says:

    Brilliant! Thought that was going to be a terrible start to a monday Morning.
    Thanks!

  8. komiles says:

    thank you~!

  9. Juni says:

    Thanks a lot. Works great for me.

  10. Marc says:

    Well that was an easier fix than I expected! 🙂

  11. Chris says:

    thanks nice one!

  12. David says:

    Thank you! I was freaking out when i saw this on my dev environment. Worked like a charm =)

  13. Chandra says:

    Worked like a charm. Thank you.

  14. Bharathi A says:

    Really helped. Cheeeeeeeeeeeeeeeeeeers!!

  15. sdfsdf says:

    Saved my day!!!!!!!!!

  16. Ben LeDuc says:

    I did not just delete the .vbox file to get the issue resolved.

    I followed the directions and went to Virtual Box. I read the error and saw it could not find the .vbox file. I copied the last temp file to .vbox and it all worked.

    Not sure about deleting the .vagrant file but seemed to have worked above for others.

    • Chris says:

      Ben, so long as you have a file with the appropriate ID, you should be fine.

      Destroying .vagrant directory will just prompt Vagrant to recreate it.

  17. Chau says:

    Saved my butt! Thank you so much!!

  18. John says:

    Thanks a million. This post is really helpful.

  19. Nat says:

    Thanks, worked for me.

  20. Thank you for this. I had this exact problem after I had upgraded both my VirtualBox and my Vagrant installation. Appreciate you posting the right solution up. I cleared out my .vagrant directory and redid the “homestead up” and it worked.

  21. sanyogita says:

    upon deleting the .vagrant folder within the project and rerun vagrant up command,
    Couldn’t open file /C:/Users//Documents/Homestead/base

    please help

    • Chris says:

      Apologies, I only just now noticed this comment. Sorry but I never used vagrant under Windows. All my experience is on linux/mac and I’m *assuming* that issue is going to be Windows environment specific.

  22. Oscar says:

    Thanks bro.

  23. Pradeep Sharma says:

    Thnxx.. It worked.

  24. Matt says:

    I just did this, and there is a big problem that is not mentioned. This forces vagrant to re-import the box you were using. That destroyed all my MySQL databases. Be warned, make a backup first.

  25. Gijs says:

    Thanks!

    Now back to work :p

  26. Huyền says:

    Thanks, worked for me

  27. Jockey Ng says:

    Thanks and worked, Chris

  28. baijunyao says:

    Thanks, worked for me

  29. Akhil HH says:

    Thanks. it works

  30. Erick says:

    thanks!

  31. Yone Yone says:

    Thanks Bro

  32. Mayur Sancheti says:

    Thanks …It worked!!!!

  33. Merv says:

    saved me…. thank you

  34. Oleg says:

    You are so cool, man. Thanks

  35. ateek says:

    thank… we should pay reward for this solution. you deserve.

Leave a Reply

Your email address will not be published. Required fields are marked *