Vagrant up takes a long time after "Waiting for machine to boot. This may take a few minutes..." to finish booting

osx-mountain-lion, ubuntu-12.04, vagrant

Solution

You are using a box which has virtualbox guest additions 4.3.x , yet your host is running 4.2.x

Because of this discrepancy, Virtualbox is unable to execute some command that is part of the create process.

Either getting a new box running guest additions 4.2.x, or upgrading your virtualbox to 4.3.x will likely solve this issue.

Update

Try setting the following in your vagrant file

config.vm.boot_timeout = 300

Also try turning on debuging

vagrant up --debug

Update 2

Some vm's just don't play nicely with incompatible versions of guest additions. For example, a centos and debian box from the same company. The centos will timout, while the debian will work fine.

http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210.box http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210.box

Problem

I have an ubuntu virtualbox. Everything works fine, except that on boot, it takes about 5 or more minutes after the message `Waiting for machine to boot. This may take a few minutes...` before it finishes booting: ``` ➜ my_box vagrant reload /Users/pinouchon/.vagrant.d/boxes/my_box/virtualbox/include/_Vagrantfile:5: warning: already initialized constant VAGRANTFILE_API_VERSION [default] Attempting graceful shutdown of VM... [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) # More port forwards [default] Booting VM... [default] Waiting for machine to boot. This may take a few minutes... # waits about 5 minutes at this point, then: [default] Machine booted and ready! [default] The guest additions on this VM do not match the installed version of VirtualBox! In most cases this is fine, but in rare cases it can cause things such as shared folders to not work properly. If you see shared folder errors, please update the guest additions within the virtual machine and reload your VM. Guest Additions Version: 4.3.0 VirtualBox Version: 4.2 [default] Configuring and enabling network interfaces... [default] Mounting shared folders... [default] -- /vagrant ``` This box used to be much quicker (about 30s to boot). So I think it is a network config that causes a timeout or something like that. It tried the fixes proposed here: https://github.com/mitchellh/vagrant/wiki/%60vagrant-up%60-hangs-at-%22Waiting-for-VM-to-boot.-This-can-take-a-few-minutes%22 but without success. (I tried the fix `Resolve it` and the `workaround 2.`). I also tried removing any 127.0.0.1 entries in my `/etc/hosts` files. Without success. Any hint ? OS / Versions: ``` Host: OSX 10.8.5 Guest: Ubuntu 12.05 Virtualbox: 4.2 ```

Original source

Related problems