Vagrant up error in headless Ubuntu: The guest machine entered an invalid state while waiting for it to boot
Asked Answered
H

14

38

I need to install vagrant in headless ubuntu (Ubuntu 12.04.2 LTS-64 Bit). Vagrant ver-v1.3.0 and Virtual box- 4.2.18. After adding the vagrant package box, when I am giving "vagrant up" command, am getting the following error:

Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[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...
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.

When I searched this error message, I found the need to modify your BIOS to enable VT-x features. But I don't know, how to do it as it is a headless ubuntu remote server. Also am not sure whether enabling VT-x will fix the problem.

Can someone help me with this?

Hanuman answered 17/10, 2013 at 6:19 Comment(5)
Try to run vagrant with debug logs, you should see much more details: "VAGRANT_LOG=debug vagrant up"Dannydannye
I tried vagarnt with debug logs and here is some part the output:ERROR warden: Error occurred: 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. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR vagrant: /opt/vagrant/embedded/gems/gems/vagrant-1.3.0/lib/vagrant/action/builtin/wait_for_communicator.rb:52:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.3.0/lib/vagrant/action/warden.rb:34:in call'Hanuman
I ran into the same problem and I solved it by downgrading VirtualBox to an older version (I used 4.3.12). It worked afterwards. Try it ;)Paltry
I hate to do a 'me too', but downgrading to 4.3.12 was what worked for me too.Visser
I have a Virtualbox 4.3.20r96996 and downgrading didn't help fix this problem!Incorrect
O
27

According to mitchellh

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

my solution

I use vagrant under windows though, I solved this problem by simply kill all the VirtualBox process, and restart VirtualBox GUI, start the VM, then normally power off it.

maybe useful links

These two issues may help.

https://github.com/mitchellh/vagrant/issues/2157

https://github.com/mitchellh/vagrant/issues/2187 may also be helpful.

Ordinarily answered 11/11, 2013 at 6:12 Comment(6)
I modified the BIOS to enable VT-x features and it solved my issue. Thanks for the help.Hanuman
How do you do that in the BIOS?Meanwhile
@orylbg try to look for Virualization setting in BIOS.Bogusz
Killing the process works just fine here. I already enabled the BIOS VT Features before.Kresic
@Hanuman That is not the cause. You touch bios, means restart your computer make it works.Gitlow
In my case, starting the machine just failed giving an error message, researching on which I found this mysterious solution. Wrote about that also hereZinciferous
L
9

In case if you've installed the virtual box 4.3.14 then there is a known issue of "Anti virus conflict". You need to uninstall the 4.3.14 and install 4.3.15 as explained in this thread.

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

Lapful answered 16/8, 2014 at 13:21 Comment(1)
This fixed it for me on Windows 8.1.Catinacation
A
4

In my case I tried to start the VirtualBox via the GUI. It turned out that VT-x/AMD-V hardware acceleration was not activated on my system and later that it wasn't available. I had to use a 32 Bit Distribution along with this config settings.

Asinine answered 22/4, 2014 at 16:29 Comment(0)
R
4

A lot of these answers assume you're debugging a machine with a GUI, whereas the question is about a headless Ubuntu server.

The equivalent of looking in the Virtualbox GUI is the vboxmanage command, which can give you a log of info. Trying to do stuff that isn't working in Vagrant through VBoxManage directly will give you plenty of options to troubleshoot.

In my case just clearing up old VMs fixed my issues.

vboxmanage list vms

This will display the name and UUID of the VMs Virtualbox currently has registered. Grabbing the UUID of existing machines and clearing them up fixed the problems.

vboxmanage unregistervm $uuid --delete
Recall answered 2/3, 2016 at 12:20 Comment(1)
for headless servers, if x windows exists, and you are connecting via SSH, you can use ssh -Y <ip> to be able to open GUI's. Also for cygwin it is: apt-cyg install xinit; startxwin&; ssh -Y <ip>Holocrine
D
2

What ended up working for me when I encountered this error was checking my bios options. I have a lenovo thinkpad x240 and ended up discovering some virtualization options that were disabled.

Once I enabled these, virtualbox functioned as expected.

Dieppe answered 30/12, 2014 at 20:55 Comment(0)
L
1

Had an unplanned hard shutdown of my system running several virtual box instances, including Vagrant (Specifically VVV) producing the same error output when vagrant up was attempted.

Solved it with the vagrant reload command.

Several WordPress dev sites now back up and running.

Listlessness answered 28/4, 2015 at 23:48 Comment(1)
don't know why it has 2 unexplained downvotes, but it worked for meCocteau
E
0

I'm a bit late, but I had the same error message and resolved it by locating the .vmdk for the problematic machine manually, and opening it in VirtualBoxManager (or whatever you use).

Era answered 28/10, 2014 at 7:19 Comment(0)
P
0

I met this problem recently, since I had used vagrant and virtualbox in the past couple of months with nothing wrong.

When I start the vm in virtualbox GUI, it shows a error dialog. By googling the error message, I found it might be an Avira (which is a anti-virus software) bug.

A solution described here: https://forums.virtualbox.org/viewtopic.php?f=6&t=67840&start=195#p347694

  • Open Avira configuration and go to General -> Security.
  • Disable product protection options (all three).
  • Press Ok button to save configuration.
  • Press Start->Settings-> Control Panel->System.
  • Start "Device Manager" in the tab "Hardware".
  • In "View" menu activate the option "Show hidden devices".
  • Now select the node "Non-plug and play drivers".
  • Right-click on the driver "avipbb" and select "Properties".
  • In tab "Driver" select the option "Disabled" and click OK.
  • Close all and reboot.

It works for me.

Paper answered 15/12, 2015 at 6:36 Comment(0)
V
0

For me this started to happen just after upgrading Avast Free Antivirus to v11.1.2253.

Although I'm having the VT-X option enabled, when started a box using VirtualBox Manager I've been receiving errors that it is not (VERR_VMX_MSR_LOCKED_OR_DISABLED).

Another issue was that the VirtualBox Manager showed up Operating system Ubuntu (32-bit), when the box is 64-bit.

Solution is to disable 'Enable hardware-assisted virtualization' in Avast Antivirus, at least until Avast team solves it.

Source: Avast forums > Avast Free 11.1.2253 & VirtualBox 5.0.14

For future reference: VirtualBox may conflict with other programs using virtualization: The usual culprits are system level debuggers, other VM platforms, and some resident anti-virus applications as described on [VirtualBox forum](https://forums.virtualbox.org/viewtopic.php?f=1&t=62339.

Voltz answered 9/2, 2016 at 19:17 Comment(0)
B
0

In my case Vagrant or VirtualBox or Laravel's Homestead has messed something up. During vagrant up command I saw that it is generating some settler_ folder in my VM folder, and then it renames the folder to homestead-7, and then tries to run the machine... but the disk for the machine still points to the path in settler_ folder! I have to manually remove the attached disk and attach the right one instead.

Bukharin answered 18/2, 2016 at 16:3 Comment(0)
H
0

In my case:

  • updating vbox
  • when running vagrant up, the OS was booting and waiting for a network connection, taking forever
  • to fix, open vbox, show the active vm, click the icon for network adapters, disable ethernet connection, enable nat.
  • the vm continues to boot, and vagrant can connect through ssh
Hyperparathyroidism answered 7/10, 2016 at 8:36 Comment(0)
J
0

I had same issue and I have tried with vagrant destroy and then again vagrant up and its works for me

Jara answered 17/12, 2020 at 11:45 Comment(0)
M
0

I was getting the same error. I tried multiple things like re-installing vagrant and virtualbox, enabling virtualization in bios etc:- Nothing worked for me.

My OS: ubuntu 20.04
virtual box: 6.1
Vagrant: 2.2.9

When I see VBox.log. I saw below error

00:00:03.918526 VMMDev: Guest Log: BIOS: CDROM boot failure code : 0003
00:00:03.918663 VMMDev: Guest Log: BIOS: Boot from CD-ROM failed
00:00:03.918841 VMMDev: Guest Log: BIOS: Boot : bseqnr=3, bootseq=

When I searched for above I came to know that I have to add new drive. I followed this https://www.techrepublic.com/article/how-to-add-new-drives-to-a-virtualbox-virtual-machine/

I did following. VirtaulBox->select your virtual machine->settings->storage->Controller SATA->click on sign(flap-disk and with plus-sign on below)->add-path and removed empty directory.

It is worked now

Muckrake answered 30/6, 2021 at 12:18 Comment(0)
R
0

In my case, the display setting of my VM was not configured properly. This is how I fixed it:

  • Open Oracle VirtualBox GUI
  • Select your Machine
  • Power off your machine by right clicking and selecting Close - Power off
  • Tap on The "gear" Settings Icon
  • Enter Display
  • In "Graphics Controller", Change it to VMSVGA

Tap OK to save

Use the command vagrant up in your terminal to reboot the machine

That's how I fixed mine.

Rox answered 9/6, 2022 at 9:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.