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

Timed out while waiting for the machine to boot #1607

Closed
juliuscaesarnl opened this issue Feb 2, 2021 · 4 comments
Closed

Timed out while waiting for the machine to boot #1607

juliuscaesarnl opened this issue Feb 2, 2021 · 4 comments

Comments

@juliuscaesarnl
Copy link

juliuscaesarnl commented Feb 2, 2021

Versions

  • Vagrant: 2.2.14
  • Provider: Virtualbox 6.1.16
  • Homestead: 11.4.0
  • Box (settler): 10.1.1

Host operating system

Windows 10 build 19042.746

Homestead.yaml

ip: 192.168.10.10
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
  - ~/.ssh/id_rsa
folders:
  - map: 'C:\projects\portal'
    to: /home/vagrant/code
sites:
  - map: portal.test
    to: /home/vagrant/code/public
databases:
  - portal
features:
  - mysql: true
  - mariadb: false
  - ohmyzsh: false
  - webdriver: false
backup: false
name: portal
hostname: portal

Vagrant destroy & up output

Vagrant output
Note: creation of VM and first time booting always succeed.

Expected behavior

The VM boots up without timeouts.

Actual behavior

Almost every time, the 'vagrant up' command times out. It seems that there's some process inside the VM which is stalling the CPU on boot. What I've noticed is that booting continues as soon as I open the display output of the VM from VirtualBox. It also shows in the display output that the CPU is stalling. See the screenshot:
image

Here's what I've tried so far:

  • Use different versions of Vagrant down to 2.2.10
  • Use different VirtualBox versions down to 6.1.12
  • Clean install both Vagrant and Virtualbox
  • Different versions of Homestead and Settler

On top of this, the rest of my team is also experiencing the same issue, so it's not isolated to my machine.
The issue seems to be introduced since Homestead v11.x and Settler v10.x

Steps to reproduce

  1. Execute 'vagrant up'
  2. Wait until the VM boots up

References

None

@svpernova09
Copy link
Contributor

Do you have virtualization enabled in your BIOS? This is a Virtualbox failure, nothing Homestead can do if the provider can't boot the machine. Does the same thing happen with another vagrant box? I'd assume so.

@juliuscaesarnl
Copy link
Author

I do have it enabled, but I doubt that this has something to do with this issue. I've had it enabled for the last 2 years and been using Homestead and VirtualBox since then, without any issues.

Either way, I've booted up a different box (ubuntu/focal64) with a basic Vagrantfile and I get the same behavior, so it's definitely not a Homestead issue. Thanks for the suggestion! Will close the issue now.

@svpernova09
Copy link
Contributor

If you need help chasing down ideas or just want to ask general virtualization questions I'm in #homestead on the Laravel Discord Server. There are a few people around that might can help.

@juliuscaesarnl
Copy link
Author

juliuscaesarnl commented Feb 4, 2021

Update: after trying different things I finally figured out the solution for my machine.
Your clue about virtualization gave me inspiration to look in that direction. Found the solution on StackOverflow.

Basically, I found out that CPUs stalling in a VM is related to nested virtualization and that enabling this option should fix the issue. Unfortunately it was grayed out. I once enabled the Hyper-V feature, then disabled it again but apparently this doesn't fully remove/disable the feature. So this was the reason I couldn't enable the Nested VT-x option in the VM's settings.
image

I already knew that Hyper-V and other virtualization software don't play so well together, but I didn't figure that this could be the issue since I disabled it (guess not). Either way, I can finally boot up the VM without issues, after months of trying different solutions.

Appreciate the help and thanks for providing me this clue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants