Vagrant guest machine entered an invalid state
Asked Answered
T

3

7

I'm trying to setup bosh-lite (to then install cloudfoundry locally) on a ubuntu server machine (vagrant v1.6.3, Virtualbox 4.3.20r96996). The setup fail when vagrant tries to boot the created machine with the following error:

$ cd bosh-lite
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'cloudfoundry/bosh-lite' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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.

If the provider you're using has a GUI that comes with it, it is often helpful to open that and watch the machine, since the GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the VirtualBox GUI is open.
Telling answered 27/1, 2015 at 12:10 Comment(7)
possible duplicate of Vagrant Up Error In Headless Ubuntu: The guest machine entered an invalid state while waiting for it to bootMcfadden
I'm on a ubuntu server (no GUI) so the solutions won't work for me :(Telling
It doesn't matter if you use GUI or not you still can manipulate the provider (in this case VirtualBox) though command line (shell).Mcfadden
@elsoufy I am facing same error in ubuntu on azure; Have you any solution ?Precautious
@RaviG. I had to enable VT-x (see my comment below), for a detailed step by step bosh lite installation check my blog post - hereTelling
@elsoufy I am working on azure cloud; there is no option to change it !!!, Also I checked on azure cloud for VT feature is enable.Precautious
@RaviG. try with another version of virtualbox (i.e. downgrade) i had to do this for many similar problems (vagrant and in another case docker).Telling
S
3

I got this error after using vagrant up on the cmd after an unplanned hard shutdown of my system running several virtual box instances, including headless Vagrant (Specifically VVV) for my Wordpress development.

Solved it with the vagrant reload command.

Several WordPress dev sites now back up and running.

Schreiner answered 28/4, 2015 at 23:53 Comment(1)
I fixed this issue by enabling VT-x github.com/cloudfoundry/bosh-lite/issues/220Telling
M
1

Go to your BIOS setting of your computer. Then turn on the hardware virtualization.

Morbihan answered 4/1, 2016 at 12:42 Comment(0)
C
0

I use linux mint

PRETTY_NAME="LMDE 6 (faye)"
NAME="LMDE"
VERSION_ID="6"

I got almost the same error. I have used these Vagrant files before without any problem:

==> 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.

My Vagrant installation method involved downloading the Vagrant binary from the official HashiCorp site and copying it to the "/usr/local" folder. This way of installing Vagrant was the reason for the errors I encountered.

I resolved the issue by removing the Vagrant binary and installing Vagrant using a package manager. During the installation, I noticed that there were many dependencies that were not installed when simply placing the Vagrant binary in a folder included in the $PATH variable.

Summarized:

 - remove existing vagrant binary file
 - install vagrant with package manager -> apt install vagrant 
Censor answered 3/6 at 10:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.