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

Booting CentOS 7.3 vagrant box on CentOS 7.4 host times out #9058

Closed
vhosakot opened this issue Oct 13, 2017 · 6 comments
Closed

Booting CentOS 7.3 vagrant box on CentOS 7.4 host times out #9058

vhosakot opened this issue Oct 13, 2017 · 6 comments

Comments

@vhosakot
Copy link

Vagrant version

# vagrant -v
Vagrant 2.0.0

Host operating system

CentOS 7.4

# cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)

Guest operating system

CentOS 7.3 (box version 1707.01)

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.box_version = "1707.01"
end

Expected behavior

Should not timeout and the vagrant box must boot properly.

Actual behavior

# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos/7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'centos/7' is up to date...
==> default: Setting the name of the VM: root_default_1507909053344_41735
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> 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.

Provider is VirtualBox 5.1.28:

# virtualbox --help | grep Virtual
Oracle VM VirtualBox Manager 5.1.28

# VBoxManage --version
5.1.28r117968

Steps to reproduce

See "Actual behavior" above.

@vhosakot
Copy link
Author

vhosakot commented Oct 14, 2017

I spent the past three days debugging this issue and still not able to resolve this.

A million people are seeing this. Vagrant MUST find the root cause, fix it or worst-case print a better, user-friendly, understandable error message why we cannot SSH into the vagrant box.

geerlingguy/drupal-vm#953
#7176
#7930
geerlingguy/drupal-vm#824
fideloper/Vaprobash#563
#7673
#3951
fgrehm/vagrant-lxc#388
#5984
#2321
geerlingguy/drupal-vm#965
chef/bento#682
#3802
GoSecure/malboxes#65
projectatomic/adb-atomic-developer-bundle#264
cloudfoundry-attic/bosh-lite#238
#5659
geerlingguy/drupal-vm#1129
geerlingguy/drupal-vm#409
#2157

#7648 (comment)

@briancain
Copy link
Member

Hello @vhosakot - have you tried a different vagrant box? We usually recommend people use the bento vagrant boxes such as "bento/centos-7.2". Give that a go, and let us know if you still are experiencing the timeout issue. Thanks!

@x-cubed
Copy link

x-cubed commented Oct 25, 2017

I had this issue and discovered that VT-x was disabled on the host. Unfortunately, neither vagrant nor VirtualBox seem to expose this as an error message, I only found it out by starting up the full VirtualBox UI, at which point I received a popup error message. Once the host was rebooted with VT-x enabled, the problem went away.

It seems like maybe VirtualBox is doing the wrong thing here, as the logs show that the virtual machine has started, and the VBoxHeadless processes remain running, even though the VM is unable to boot completely. It would make more sense for it to immediately quit with an error message, rather than sit idle.

@LafayetteDevOps
Copy link

I had the same issue but in my case I am working on a RHEL 7.3 virtual machine as my dev box and booting a vagrant box based on RHEL 7.4 within that environment. Every time I would try to boot the vagrant box I would receive the time out as noted above.

Software on my dev box ...
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
$ vboxmanage --version
5.1.30r118389
$ vagrant --version
Vagrant 2.0.0

Resolution:
Enable hardware virtualization in vSphere for my dev box within Edit Settings > CPU. This does require a reboot of the vm but it does resolve the issue. Hope it helps.

@briancain
Copy link
Member

Hey there,

I am going to close this due to lack of response. If this is still occurring, please open a new issue and follow the provided issue template that appears when you click the "New Issue" button. This will help us in getting a reproduction and fix. Thanks!

@ghost
Copy link

ghost commented Mar 31, 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 Mar 31, 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

4 participants