Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"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." #2157

Closed
roelvanduijnhoven opened this issue Sep 7, 2013 · 69 comments

Comments

@roelvanduijnhoven
Copy link

At the moment I can no longer vagrant up from an initial Vagrentfile using box precise64 (but also precise32). The strange thing is that it did work before (just after I installed it).

The output of running VAGRANT_LOG=info vagrant up is found in this gist: https://gist.github.com/roelvanduijnhoven/6477492

I have no clue what is going wrong!

The error I get is:

"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."
@mitchellh
Copy link
Contributor

Can you start the machine manually (from the GUI)? This error message is usually indicative of VIrtualBox issues.

@roelvanduijnhoven
Copy link
Author

There are 3 image listed in VirtualBox. One works fine (32 bit); the other two (both 64 bit) will not start. Error message:

Het is niet gelukt een sessie te openen voor virtuele machine vagrant-test_default_1378574376.
VT-x features locked or unavailable in MSR. (VERR_VMX_MSR_LOCKED_OR_DISABLED).

Resultaat Code:
NS_ERROR_FAILURE (0x80004005)
Component:
Console
Interface:
IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}

After I tried this I manually removed all three images and added a new precise32 box again. Now it works again..

@mitchellh
Copy link
Contributor

You need to modify your BIOS to enable VT-x features on your motherboard.

@erikperez
Copy link

I recently received the same error using both 1.3.1 and 1.2.7 (different message, but the same error).
I tried to uninstall Hyper-V (required for the windows phone emulator) and made sure that VT-X also was enabled in BIOS and then it worked.

The error VERR_VMX_MSR_LOCKED_OR_DISABLED means that you either don't have VT-X enabled or that an application or service is running and blocking/using VT-X. Try to stop the application/services that uses it and see.

@ekrupnik
Copy link

Is there something I can set in the definition of a VeeWee box to ensure I can run that VM on the machine I run Vagrant on? (A CentOS virtual machine). I am having the same error 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.

@aniss
Copy link

aniss commented Oct 16, 2013

On ubuntu I did "sudo modprobe vboxnetflt" it worked!

@wikichua
Copy link

sudo dpkg-reconfigure virtualbox-dkms
sudo dpkg-reconfigure virtualbox

this is what i did, and it works..

@ghost
Copy link

ghost commented Dec 7, 2013

Same error for Windows 8, any help?

@ghost
Copy link

ghost commented Dec 16, 2013

Is VT-x/hardware virtualization required to start a vm?

$ VBoxManage startvm test_project_default_1387217556617_76540 --type headless
Waiting for VM “test_project_default_1387217556617_76540” to power on…
VBoxManage: error: VT-x is not available. (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Console, interface IConsole

Run into the same thing with vagrant up as well.

Sorry to ask here, I know this is a VirtualBox question, but hopefully someone will be able to answer.

@ghost
Copy link

ghost commented Dec 16, 2013

Update: Looks like it is not always required: https://www.virtualbox.org/manual/ch10.html#hwvirt
And this seems to be a way to disable? http://aminsblog.wordpress.com/2012/05/27/vt-x-is-not-available-ve/

@mitchellh
Copy link
Contributor

@rakm VT-x is required for 64-bit VMs. But either way you'll have a really bad time without it (really slow).

@ghost
Copy link

ghost commented Dec 16, 2013

Ok, will keep that in mind. Thanks @mitchellh

@Brade
Copy link

Brade commented Jan 14, 2014

FYI I started having this problem recently after Vagrant working fine for months. The only thing that changed is (drum roll...) upgrading to OSX Mavericks. Would that have anything to to w/ anything? I'm using the latest Vagrant, latest VirtualBox, and I downloaded the precise32 box file from scratch, and I still get this dumb error.

@mcandre
Copy link

mcandre commented Feb 3, 2014

I'm getting the same error.

Source:

https://github.com/mcandre/hello-vagrant

Trace:

C:\Users\andrew\Desktop\src\hello-vagrant>vagrant destroy & vagrant up
Are you sure you want to destroy the 'default' VM? [y/N] y
[default] Destroying VM and associated drives...
[default] Running cleanup tasks for 'puppet' provisioner...
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise64'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
DL is deprecated, please use Fiddle
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.

System:

C:\Users\andrew\Desktop\src\hello-vagrant>specs vagrant virtualbox chocolatey os

Specs:

specs 0.8
https://github.com/mcandre/specs#readme

vagrant --version
Vagrant 1.4.3

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" --version
4.3.6r91406

chocolatey version


found         : 0.9.8.23
name          : chocolatey
latestCompare : 000000000000.000000000009.000000000008.000000000023
verMessage    : Latest version installed
latest        : 0.9.8.23
foundCompare  : 000000000000.000000000009.000000000008.000000000023



Reading environment variables from registry. Please wait... Done.

systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft Windows 8.1 Pro
OS Version:                6.3.9600 N/A Build 9600

I'm running Windows inside VMware Fusion 6.0 on Mac OS X 10.9.1 Mavericks on a Haswell MacBook Air, if that matters.

@ClausMunch
Copy link

I had the same error.. Just removed Hyper-V on my Windows 8.1 machine and now it works! :)

@Brade
Copy link

Brade commented Feb 26, 2014

Also: it does appear that the latest version of VirtualBox (4.3.8) fixed the issue and it runs fine w/ Vagrant again. Huzzah!

@patcon
Copy link

patcon commented Apr 24, 2014

You need to modify your BIOS to enable VT-x features on your motherboard.

@mitchellh You rock.

@Videl
Copy link

Videl commented Jun 27, 2014

I have the same issue, on Virtual Box 4.3.10_Ubuntu r93012 on Linux Mint 17.

@LeeGDavis
Copy link

Same thing here:
Windows 7x64
Virtualbox: VirtualBox-4.3.14-95030
Vagrant: 1.6.3
VT-x enabled

@paullintilhac
Copy link

but how do you start virtualbox from the gui? I can't find this anywhere on the internet, and none of the recommendations for starting it in the command line work.

@SoboLAN
Copy link

SoboLAN commented Jul 17, 2014

Hi guys.

I had the same problem today. I had VirtualBox 4.3.14 installed. I downgraded to VirtualBox 4.3.12 and it just worked. Hope this helps the next poor and frustrated soul who passes by...

@paullintilhac
Copy link

x2. I was very confused about all this talk of the GUI because with version 4.3.14 I wasn't even able to see the gui for some reason. Anyways, I tried 4.3.12 and it worked, and I am now able to see the gui.

@ghost
Copy link

ghost commented Jul 31, 2014

@Brade I got the same error message, except for the VM state (aborted). And apparently, started after upgrading to the latest releases of OSX (Mavericks), Vagrant (1.6.3.) and VirtualBox (4.3.14):

The guest machine entered an invalid state while waiting for it to boot. Valid states are 'starting, running'. The machine is in the 'aborted' state.

It was working fine with older releases of Vagrant and VirtualBox on Mavericks (although I needed to restart VirtualBox before issuing the vagrant up command).

When starting the VM using the VirtualBox GUI, everything was working fine. Also, setting v.gui = true on the Vagrantfile and starting the VM in the CLI worked too.

After looking the VirtualBox logs, I found this:

OpenGL Error: Render SPU: Couldn't get a double-buffered, RGB visual with Z!

The solution was to disable the 3D acceleration, using modifyvm:

config.vm.provider "virtualbox" do |vb|
  vb.customize ["modifyvm", :id, "--accelerate3d", "off"]
end

Also related to #2720.

@jianxiaoxuan
Copy link

Same error for windows 8.1 , Then I installed the windows7, But it still appears this stupid mistake.

@feribg
Copy link

feribg commented Aug 28, 2014

I can confirm that this is a VirtualBox error. Since upgrading to 4.3.14 all my boxes including old ones have started to fail with that similar message and became unbootable either via the GUI or vagrant. Vt-x is enabled. After downgrading to VB 4.3.12 everything is back to normal, the boxes both 64 and 32 bit work without a problem and Vt-x is active in the VirtualBox settings for the machines. Although not sure what is causing the issue, downgrading clearly fixes it for me. Hope that helps others

Host is 64 bit Windows 7

@nhomar
Copy link

nhomar commented Sep 1, 2014

Hello.

I was receiving this error on OSx 10.9.4 too! just updated virtual box to 4.3.14 r95030 and it was solved.

Thanks,

@cdaringe
Copy link

updating to el capitan killed it! thanks for the tips! booting into the gui yielded "Kernel driver not installed (rc=-1908)". googling that error led to several forums indicating that virtualbox has kernel hooks that were incompatible after the OS update. reinstalling virtualbox solved the issue!

@switchflip
Copy link

I also updated from vagrant 4.3.1 to 5 and everything works swimmingly 👍

@MrLokans
Copy link

Same problem occured when I tried to specify 'config.vm.network "private_network", type: "dhcp"' setting. I solved that issue by loading kernel modules for the virtual box:

# modprobe vboxnetflt
# modprobe vboxpci
# modprobe vboxnetadp

Don't forget to check whether they were truly loaded by

lsmod | grep vbox

@KokareIITP
Copy link

I am working with Vagrant 1.7.4 and Virtual Box 5.0.10 , but when I do vagrant up with git bash I get the following error,
screenshot 19

How do I resolve this ?

@yurivyatkin
Copy link

TL;DR Go to "VirtualBox Host-Only Network Properties" and disable and then enable "VirtualBox NDIS6 Bridged Networking Driver".

I just got started with Vagrant under Windows 10, and immediately run into this issue. Following comments above, I tried to start the vagrant's machine manually in VirtualBox GUI, but it failed with the error message "Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter' (VERR_INTNET_FLT_IF_NOT_FOUND)." Researching on the latter input, I found this mysterious solution http://stackoverflow.com/a/33733454/1008341

@set0x
Copy link

set0x commented Dec 12, 2015

Windows: 10, Virtual Box,: 5.0.10, Vagrant: 1.7.4... Solution

Went to the C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv directory, right clicked on VBoxDrv.inf and selected Install. I then went back to my console and typed 'sc start vboxdrv'.

https://forums.virtualbox.org/viewtopic.php?f=6&t=66442

@x-zheng16
Copy link

How to go to VirtualBox Host-Only Network Properties?

@set0x
Copy link

set0x commented Dec 15, 2015

tut

@x-zheng16
Copy link

Thanks a lot~

@milan612-zz
Copy link

Using Ubuntu Trusty on OSX. checked
"Enable hyperversion applications on this virtual machine." in VM setting and all good :)

@sgsheg
Copy link

sgsheg commented Jan 18, 2016

👍 It help me.

@miparnisari
Copy link

I got this error right after upgrading Windows to Windows Anniversary Update.

@mattkaye
Copy link

Just found this:
http://superuser.com/questions/1111027/fix-vagrant-up-after-windows-10-anniversary-update

@miparnisari
Copy link

Yep, that answer did the trick for me.

@thiyagarajan
Copy link

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'hashicorp/precise64' 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: Forwarding ports...
default: 3000 (guest) => 3000 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

VTR@VTR-pc MINGW64 ~

@mattkaye
Copy link

thiyagarajan, this has already been solved. It has nothing to do with networking or a timeout issue

@unifreak
Copy link

unifreak commented Dec 8, 2016

using vagrant on Windows 7 64bit, with Virtual box 4.3.12. every thing is normal when I first installed vagrant and some box. then this day it just vagrant up just can start, with the same erorr message.

Vt-* is enabled. other box in virtual machine is fine.

I solved this by update virtual box to 5.1.10

@CatoMinor
Copy link

I received the "The guest machine entered an invalid state while waiting for it to boot" error after performing a reinstall of Norton Internet Security (antivirus software). I was able to run my VM via the VirtualBox GUI, just not with vagrant up (also MySQL Workbench could not connect to DB). I went into my BIOS, disabled virtualization, restarted, went into BIOS again and then re-enabled virtualization. Odd as it may seem, following this, vagrant up (and MySQL Workbench) began working properly again.

@agnesdai
Copy link

I had the error. I followed the instructions here and dowloaded virtual box 4.3.12 ; vagrant init hashicorp/precise32 ; vagrant up and vagrant ssh and it worked in less than 5 mins. Hope this helps.

@starikovs
Copy link

starikovs commented May 21, 2017

Hey! I just had this error when I upgraded my osx to macOS Sierra, so I entered vagrant up and got:

The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'aborted' 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.

So, after upgrading the VirtualBox from 4.3 to the current 5.1 version, and vagrant from 1.7.2 to 1.9.5, it fixed!!

@maksnester
Copy link

maksnester commented May 22, 2017

Virtual Box Version 5.1.22
Vagrant 1.9.5
Windows 10

Have this problem too. I can see in GUI that machine is running but cli doesn't think so.

@lzh1104
Copy link

lzh1104 commented Sep 11, 2017

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: You are trying to forward to privileged ports (ports <= 1024). Most

==> default: operating systems restrict this to only privileged process (typical
ly
==> default: processes running as an administrative user). This is a warning in
case
==> default: the port forwarding doesn't work. If any problems occur, please try
a
==> default: port higher than 1024.
==> default: Forwarding ports...
default: 22 (guest) => 1322 (host) (adapter 1)
default: 80 (guest) => 80 (host) (adapter 1)
default: 443 (guest) => 443 (host) (adapter 1)
default: 3306 (guest) => 3306 (host) (adapter 1)
default: 6379 (guest) => 6379 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'unknown' 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.

The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.

@MehdiElayeb
Copy link

ayebm vagrant
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/ubuntu-16.04-i386'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/ubuntu-16.04-i386' is up to date...
==> default: Setting the name of the VM: vagrant_default_1519659828987_21771
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 8000 (guest) => 8000 (host) (adapter 1)
default: 8080 (guest) => 8080 (host) (adapter 1)
default: 5000 (guest) => 5000 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'unknown' 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.

The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.

@guilhermeureis
Copy link

Step by step:
I opened Virtualbox.
I turned off the Homestead
Then I used the vagrant up

It worked!

@godhandkiller
Copy link

@guilhermeureis Thank you!

First I destroy the vagrant machine, so I created a new one (I'm using Laravel Homestead).
Then I followed @guilhermeureis steps and It worked!

@racibaz
Copy link

racibaz commented Jul 13, 2019

Thank you @guilhermeureis

@ghost
Copy link

ghost commented Jan 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests