0

I have gentoo(linux) host machine. On which, I have Virtualbox 4.3.28 and vagrant 1.4.3 installed(these are the latest available version for gentoo).

On vagrant up, the Ubuntu 14.04 gets launched. I'm also able to ssh to Ubuntu. But then as soon as it gets launched I get the following error. Below is my Vagrantfile and output error.

P.S I have created Ubuntu 14.04 base box from scratch

-----------Vagrantfile-------------

    # -*- mode: ruby -*-

    # vi: set ft=ruby :

        Vagrant.configure(2) do |config|
          config.vm.box = "Ubuntu"
          config.vm.boot_timeout = "700"
          config.vm.provider :virtualbox do |vb|
          vb.gui = true
          end

        end 

-----------Output in terminal------------
Bringing machine 'default' up with 'virtualbox' provider...
[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...
**
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. This can
mean a number of things.
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.**

Any solution to fix this problem?

Dana
  • 139
  • 1
  • 10
  • There seem to be a couple of posts on http://serverfault.com that discuss similar issues. Your question may belong there. – WhiteViking Oct 08 '15 at 19:19
  • Mabey this is what you are looking for http://stackoverflow.com/questions/23293071/timed-out-while-waiting-for-the-machine-to-boot-when-vagrant-up/39892470#39892470 – paulalexandru May 08 '17 at 05:56

1 Answers1

0

P.S I have created Ubuntu 14.04 base box from scratch

That could be the missing piece - When you package a box, you need to run a few commands as explained below

It is very common for Linux-based boxes to fail to boot initially. This is often a very confusing experience because it is unclear why it is happening. The most common case is because there are persistent network device udev rules in place that need to be reset for the new virtual machine. To avoid this issue, remove all the persistent-net rules. On Ubuntu, these are the steps necessary to do this:

$ rm /etc/udev/rules.d/70-persistent-net.rules
$ mkdir /etc/udev/rules.d/70-persistent-net.rules
$ rm -rf /dev/.udev/
$ rm /lib/udev/rules.d/75-persistent-net-generator.rules

Can you make sure to run the command above before packaging the box.

Frederic Henri
  • 51,761
  • 10
  • 113
  • 139
  • Thanks @Frederic for your quick response. I tried the above mentioned commands. This is what I get. For the first command its says: "cannot remove ..No such file or directory." And for the third command it says " cannot remove '.rf' : No such file or directory" – Dana Oct 08 '15 at 21:41
  • `" cannot remove '.rf'` ? rf is an option so `rm -rf /dev/.udev/` should work same on 1st command, you should have those directories if you have network enabled on your VM – Frederic Henri Oct 09 '15 at 07:08