Vagrant: The guest machine entered an invalid state
Vagrant has been critical component of my development environment in 2013 and I really would not want to start a project without it anymore. Most of the companies I interviewed with this year were either working with Ops to get it setup or already using and loving it.
[Vagrant enables you to] create and configure lightweight, reproducible, and portable development environments.
The whole concept is really simple. You spin up a virtual machine with a base operating system and setup a handful of configuration files to install whatever software you need. Its all neatly packaged up in a way that makes it easy to distribute across entire teams and give everyone a consistent development environment on their machine. (If you haven’t already seen it you need to check out Puphpet!)
Okay, but how do I make Vagrant work?
I was setting Vagrant the other day when I got this really strange message about the machine being in a “power off” state.
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it to boot Valid states are 'starting, running'. The machine is in the 'poweroff' state. Please verify everything is configured properly and try again.
Well what the hell does that mean?
Honestly, I never took the time to figure it out. What I can tell you is that Christoph Khouri (@ChristophKhouri) eventually found this one-off post in a forum somewhere that said to repair the file permissions. So, we opened up Disk Utility, selected the partition Vagrant was sitting on and clicked on “Repair Disk Permissions” in the First Aid tab.
Bada bing bada boom. That solved the problem. If you know what causes this in the first place I would love to hear that too.