Resolving Vagrant and VirtualBox "Waiting for VM to Boot" Issue

The Issue

The company I currently work for uses Vagrant (which is awesome) to distribute standardized virtual testing environments. Vagrant is great.. Except when it doesn't work (which is not awesome).

I was a victim of the pretty notorious "waiting for VM to boot" issue that plagued certain configurations/versions of Vagrant. A little example of the help threads out there:

"Failed to connect VM" issues. Yeah, I tried every single one and more.

"Failed to connect VM" issues. Yeah, I tried every single one and more.

The Fix

I was able to (finally) get the VM to boot.

  1. Boot your VM using the VirtualBox GUI (through either Vagrantfile boot-GUI command, or starting your VM using VirtualBox). Login using "vagrant" and "vagrant" when prompted.

  2. Within the GUI, manually start dhclient using "sudo dhclient eth0 -v". Why is it off by default? I have no idea. I found out that it was off when I tried to "wget" the "private/public keys" in the tutorial above, but was unable to.

  3. Setup your private/public keys using the link provided. My box is a "Debian Linux 3.2.0-4-amd64", so instead of: "/root/.ssh/", you have to use "/home/vagrant/.ssh/" (and the respective "id_rsa" path for the private key).

    Note: make sure your files have the right permissions. Check using "ls -l path", and change using permissions "chmod". Your machine may not have "/home/vagrant/.ssh/authorized_keys", so create that file with "touch /home/vagrant/.ssh/authorized_keys".

  4. Go to your local machine's command line and reload vagrant using "vagrant reload". It should boot, and no longer hang at "Waiting for VM to Boot."

Let me know if this works for you.