Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Cant boot VM (timeout) #246

Closed
brpaz opened this issue Mar 9, 2014 · 5 comments
Closed

Cant boot VM (timeout) #246

brpaz opened this issue Mar 9, 2014 · 5 comments

Comments

@brpaz
Copy link

brpaz commented Mar 9, 2014

Hello.
I have installed vagrant-lxc plugin today and I am trying to start my first VM.
I am getting the following error:

An error occurred while executing multiple actions in parallel.
Any errors that occurred are shown below.

An error occurred while executing the action on the 'default'
machine. Please handle this error then try again:

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.

Here is my Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "precise-lxc"
  config.vm.provider :lxc do |lxc|
    # Same effect as 'customize ["modifyvm", :id, "--memory", "1024"]' for VirtualBox
    lxc.customize 'cgroup.memory.limit_in_bytes', '1024M'
  end
end

My system specs
Elementary OS Luna (based on ubuntu 12.04) with Kernel 3.2.60,
Vagrant 1.4.3
lxc version: 0.7.5
vagrant plugin version: 0.8.0

Not sure if its related to the problem but if I do ifconfig I dont have any lxcbr0 interface.

Any help?

@fgrehm
Copy link
Owner

fgrehm commented Mar 9, 2014

Yeah, Vagrant times out because it tries to find out what's the container IP and since its network is not properly configured, it is not able to identify that the container is up. For 1.0, I'm planning to show a nice error message [GH-164] when the bridge can't be found, but as of now you'll need to manually create that bridge =/

Please have a look at the instructions for configuring the bridge on Debian hosts and LMK if that works out for you so we can update the wiki.

Since there's nothing much we can do about this, I'm going to close the issue but I'm happy to continue the discussion and I'll still be notified ;-)

@fgrehm fgrehm closed this as completed Mar 9, 2014
@brpaz
Copy link
Author

brpaz commented Mar 15, 2014

I have created the lxcbr0 interface, but still dont work.

Here is the interface defined in ifconfig:

lxcbr0    Link encap:Ethernet  HWaddr 20:cf:30:19:2e:43  
          inet addr:192.168.1.83  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::14f2:d3ff:fe31:9fd0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3909 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4737 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:649493 (649.4 KB)  TX byte

my /etc/network/interfaces file

auto lo
iface lo inet loopback

auto lxcbr0
iface lxcbr0 inet dhcp
        bridge_ports eth0
        bridge_fd 0
        bridge_maxwait 0

Do I need to configure anything in Vagrant file?

@fgrehm
Copy link
Owner

fgrehm commented Mar 15, 2014

Can u show us your /etc/lxc/default.conf?

@brpaz
Copy link
Author

brpaz commented Mar 15, 2014

I dont have any /etc/lxc/default.conf. I only have a /etc/lxc/lxc.conf.

Here is the contents of lxc.conf:

lxc.network.type=veth
lxc.network.link=lxcbr0
lxc.network.flags=up

@fgrehm
Copy link
Owner

fgrehm commented Mar 15, 2014

Weird.... Maybe try to copy to that file to /etc/lxc/default.conf and check if it works? If it doesn't, try having a look at /var/lib/lxc/$(cat .vagrant/machines/default/lxc/id)/config or try running the container on the foreground with lxc-start -n $(cat .vagrant/machines/default/lxc/id) to check for some error message.

I'm planning to add some sort of networking sanity checks on the plugin with #164, so hopefully on the future people will start seeing a nice looking error message at least :P

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

No branches or pull requests

2 participants