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

lxc-create fails on Arch Linux #109

Closed
bryanalves opened this issue Jul 8, 2013 · 22 comments

Comments

Projects
None yet
7 participants
@bryanalves
Copy link

commented Jul 8, 2013

I added the quantal64 box, and create a base Vagrantfile with vagrant init. When running vagrant up however, I get a failure with the following log:


INFO global: Vagrant version: 1.2.2
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/kernel_v2/plugin.rb
INFO manager: Registered plugin: kernel
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/windows/plugin.rb
INFO manager: Registered plugin: Windows host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/linux/plugin.rb
INFO manager: Registered plugin: Linux host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/gentoo/plugin.rb
INFO manager: Registered plugin: Gentoo host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/freebsd/plugin.rb
INFO manager: Registered plugin: FreeBSD host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/opensuse/plugin.rb
INFO manager: Registered plugin: OpenSUSE host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/fedora/plugin.rb
INFO manager: Registered plugin: Fedora host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/arch/plugin.rb
INFO manager: Registered plugin: Arch host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/hosts/bsd/plugin.rb
INFO manager: Registered plugin: BSD host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provisioners/shell/plugin.rb
INFO manager: Registered plugin: shell
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provisioners/ansible/plugin.rb
INFO manager: Registered plugin: ansible
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provisioners/chef/plugin.rb
INFO manager: Registered plugin: chef
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provisioners/puppet/plugin.rb
INFO manager: Registered plugin: puppet
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/provisioners/cfengine/plugin.rb
INFO manager: Registered plugin: CFEngine Provisioner
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/status/plugin.rb
INFO manager: Registered plugin: status command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/suspend/plugin.rb
INFO manager: Registered plugin: suspend command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/destroy/plugin.rb
INFO manager: Registered plugin: destroy command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/halt/plugin.rb
INFO manager: Registered plugin: halt command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/init/plugin.rb
INFO manager: Registered plugin: init command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/plugin/plugin.rb
INFO manager: Registered plugin: plugin command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/provision/plugin.rb
INFO manager: Registered plugin: provision command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/up/plugin.rb
INFO manager: Registered plugin: up command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/ssh_config/plugin.rb
INFO manager: Registered plugin: ssh-config command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/package/plugin.rb
INFO manager: Registered plugin: package command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/reload/plugin.rb
INFO manager: Registered plugin: reload command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/ssh/plugin.rb
INFO manager: Registered plugin: ssh command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/box/plugin.rb
INFO manager: Registered plugin: box command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/resume/plugin.rb
INFO manager: Registered plugin: resume command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/communicators/ssh/plugin.rb
INFO manager: Registered plugin: ssh communicator
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/ubuntu/plugin.rb
INFO manager: Registered plugin: Ubuntu guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/openbsd/plugin.rb
INFO manager: Registered plugin: OpenBSD guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/linux/plugin.rb
INFO manager: Registered plugin: Linux guest.
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/debian/plugin.rb
INFO manager: Registered plugin: Debian guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/solaris/plugin.rb
INFO manager: Registered plugin: Solaris guest.
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/gentoo/plugin.rb
INFO manager: Registered plugin: Gentoo guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/suse/plugin.rb
INFO manager: Registered plugin: SUSE guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/redhat/plugin.rb
INFO manager: Registered plugin: RedHat guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/freebsd/plugin.rb
INFO manager: Registered plugin: FreeBSD guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/fedora/plugin.rb
INFO manager: Registered plugin: Fedora guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/arch/plugin.rb
INFO manager: Registered plugin: Arch guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/guests/pld/plugin.rb
INFO manager: Registered plugin: PLD Linux guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/kernel_v1/plugin.rb
INFO manager: Registered plugin: kernel
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/plugin.rb
INFO manager: Registered plugin: VirtualBox provider
INFO vagrant: vagrant invoked: ["up", "--provider=lxc"]
DEBUG vagrant: Creating Vagrant environment
INFO environment: Environment initialized (#Vagrant::Environment:0x000000023a1b30)
INFO environment: - cwd: /home/balves/src/blah
INFO environment: Home path: /home/balves/.vagrant.d
INFO environment: Local data path: /home/balves/src/blah/.vagrant
DEBUG environment: Creating: /home/balves/src/blah/.vagrant
DEBUG environment: Loading plugins from: /home/balves/.vagrant.d/plugins.json
INFO environment: Loading plugin from JSON: vagrant-lxc
INFO manager: Registered plugin: Linux Containers (LXC) provider
INFO environment: Running hook: environment_load
INFO environment: Initializing config...
INFO loader: Set :default = "/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/config/default.rb"
DEBUG loader: Populating proc cache for "/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/config/default.rb"
DEBUG loader: Load procs for pathname: /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/config/default.rb
INFO loader: Set :root = #Pathname:/home/balves/src/blah/Vagrantfile
DEBUG loader: Populating proc cache for #Pathname:/home/balves/src/blah/Vagrantfile
DEBUG loader: Load procs for pathname: /home/balves/src/blah/Vagrantfile
INFO loader: Loading configuration in order: [:default, :home, :root]
DEBUG loader: Loading from: default (evaluating)
DEBUG loader: Loading from: root (evaluating)
DEBUG loader: Configuration loaded successfully, finalizing and returning
DEBUG hosts: Host path search classes: [VagrantPlugins::HostWindows::Host, VagrantPlugins::HostArch::Host, VagrantPlugins::HostFedora::Host, VagrantPlugins::HostGentoo::Host, VagrantPlugins::HostFreeBSD::Host, VagrantPlugins::HostOpenSUSE::Host, VagrantPlugins::HostLinux::Host, VagrantPlugins::HostBSD::Host]
INFO hosts: Host class: VagrantPlugins::HostArch::Host
INFO runner: Running action: #Vagrant::Action::Builder:0x0000000261c928
INFO cli: CLI: [] "up" ["--provider=lxc"]
DEBUG cli: Invoking command class: VagrantPlugins::CommandUp::Command ["--provider=lxc"]
DEBUG command: 'Up' each target VM...
DEBUG command: Getting target VMs for command. Arguments:
DEBUG command: -- names: []
DEBUG command: -- options: {:provider=>"lxc"}
DEBUG command: Loading all machines...
INFO environment: Getting machine: default (lxc)
INFO environment: Uncached load of machine.
INFO loader: Set :vm_default = []
INFO loader: Loading configuration in order: [:default, :home, :root, :vm_default]
DEBUG loader: Loading from: default (cache)
DEBUG loader: Loading from: root (cache)
DEBUG loader: Configuration loaded successfully, finalizing and returning
INFO environment: Provider-supported box formats: [:lxc]
INFO box_collection: Searching for box: quantal64-lxc (lxc) in /home/balves/.vagrant.d/boxes/quantal64-lxc/lxc/metadata.json
INFO box_collection: Box found: quantal64-lxc (lxc)
INFO environment: Box found with format: lxc
INFO machine: Initializing machine: default
INFO machine: - Provider: Vagrant::LXC::Provider
INFO machine: - Box: #Vagrant::Box:0x000000029541b8
INFO machine: - Data dir: /home/balves/src/blah/.vagrant/machines/default/lxc
DEBUG lxc: Instantiating the container for: nil
INFO subprocess: Starting process: ["sudo", "lxc-version"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: lxc version: 0.9.0
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31998
DEBUG subprocess: Exit status: 0
INFO command: With machine: default (LXC (new VM))
INFO interface: info: Bringing machine 'default' up with 'lxc' provider...
INFO batch_action: Enabling parallelization by default.
INFO batch_action: Disabling parallelization because provider doesn't support it: lxc
INFO batch_action: Batch action will parallelize: false
INFO batch_action: Starting action: #Vagrant::Machine:0x00000002e01a30 up {:parallel=>true, :provision_enabled=>true, :provision_types=>nil, :provider=>"lxc"}
INFO machine: Calling action: up on provider LXC (new VM)
INFO runner: Running action: #Vagrant::Action::Builder:0x000000029d4070
INFO warden: Calling action: #Vagrant::Action::Builtin::ConfigValidate:0x00000002fa1c78
INFO warden: Calling action: #Vagrant::Action::Builtin::Call:0x00000002fa1c50
INFO runner: Running action: #Vagrant::Action::Builder:0x000000029a19b8
INFO warden: Calling action: #Vagrant::LXC::Action::Created:0x000000029a78b8
INFO runner: Running action: #Vagrant::Action::Warden:0x00000002eda5b0
INFO warden: Calling action: #Vagrant::Action::Builtin::HandleBoxUrl:0x00000002eda538
INFO warden: Calling action: #Vagrant::LXC::Action::HandleBoxMetadata:0x00000002eda510
INFO interface: info: Importing base box 'quantal64-lxc'...
DEBUG handle_box_metadata: Validating box contents
DEBUG handle_box_metadata: Setting box options on environment
INFO warden: Calling action: #Vagrant::LXC::Action::Create:0x00000002cc3588
DEBUG driver: Copying LXC template into place
DEBUG driver: Creating container...
INFO subprocess: Starting process: ["sudo", "lxc-create", "--template", "vagrant-tmp-blah-1373249959", "--name", "blah-1373249959", "--", "--arch", "amd64", "--release", "quantal", "--tarball", "/home/balves/.vagrant.d/boxes/quantal64-lxc/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/keys/vagrant.pub"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout:
DEBUG subprocess: stdout: lxc-create: No config file specified, using the default config /etc/lxc/default.conf
DEBUG subprocess: stdout: Extracting /home/balves/.vagrant.d/boxes/quantal64-lxc/lxc/rootfs.tar.gz ...
DEBUG subprocess: stderr: chroot: failed to run command ‘useradd’: No such file or directory
DEBUG subprocess: stderr: lxc-create: failed to execute template 'vagrant-tmp-blah-1373249959'
DEBUG subprocess: stderr: lxc-create: aborted
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31997
DEBUG subprocess: Exit status: 1
ERROR warden: Error occurred: There was an error executing ["sudo", "lxc-create", "--template", "vagrant-tmp-blah-1373249959", "--name", "blah-1373249959", "--", "--arch", "amd64", "--release", "quantal", "--tarball", "/home/balves/.vagrant.d/boxes/quantal64-lxc/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/keys/vagrant.pub"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
ERROR warden: Error occurred: There was an error executing ["sudo", "lxc-create", "--template", "vagrant-tmp-blah-1373249959", "--name", "blah-1373249959", "--", "--arch", "amd64", "--release", "quantal", "--tarball", "/home/balves/.vagrant.d/boxes/quantal64-lxc/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/keys/vagrant.pub"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
INFO warden: Beginning recovery process...
INFO warden: Calling recover: #Vagrant::Action::Builtin::Call:0x00000002fa1c50
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO environment: Running hook: environment_unload
INFO runner: Running action: #Vagrant::Action::Builder:0x00000002da2c38
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<Vagrant::LXC::Errors::ExecuteError: There was an error executing ["sudo", "lxc-create", "--template", "vagrant-tmp-blah-1373249959", "--name", "blah-1373249959", "--", "--arch", "amd64", "--release", "quantal", "--tarball", "/home/balves/.vagrant.d/boxes/quantal64-lxc/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/keys/vagrant.pub"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.>
ERROR vagrant: There was an error executing ["sudo", "lxc-create", "--template", "vagrant-tmp-blah-1373249959", "--name", "blah-1373249959", "--", "--arch", "amd64", "--release", "quantal", "--tarball", "/home/balves/.vagrant.d/boxes/quantal64-lxc/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/keys/vagrant.pub"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
ERROR vagrant: /home/balves/.vagrant.d/gems/gems/vagrant-lxc-0.3.4/lib/vagrant-lxc/driver/cli.rb:136:in block in execute' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/retryable.rb:17:inretryable'
/home/balves/.vagrant.d/gems/gems/vagrant-lxc-0.3.4/lib/vagrant-lxc/driver/cli.rb:126:in execute' /home/balves/.vagrant.d/gems/gems/vagrant-lxc-0.3.4/lib/vagrant-lxc/driver/cli.rb:108:inrun'
/home/balves/.vagrant.d/gems/gems/vagrant-lxc-0.3.4/lib/vagrant-lxc/driver/cli.rb:56:in create' /home/balves/.vagrant.d/gems/gems/vagrant-lxc-0.3.4/lib/vagrant-lxc/driver.rb:41:inblock in create'
/home/balves/.vagrant.d/gems/gems/vagrant-lxc-0.3.4/lib/vagrant-lxc/driver.rb:126:in import_template' /home/balves/.vagrant.d/gems/gems/vagrant-lxc-0.3.4/lib/vagrant-lxc/driver.rb:39:increate'
/home/balves/.vagrant.d/gems/gems/vagrant-lxc-0.3.4/lib/vagrant-lxc/action/create.rb:14:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:incall'
/home/balves/.vagrant.d/gems/gems/vagrant-lxc-0.3.4/lib/vagrant-lxc/action/handle_box_metadata.rb:25:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:incall'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/handle_box_url.rb:72:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:incall'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in block in run' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:inbusy'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in run' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:51:incall'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/config_validate.rb:25:incall'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in call' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:incall'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in block in run' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:inbusy'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in run' /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/machine.rb:147:inaction'
/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/batch_action.rb:63:in `block (2 levels) in run'
INFO interface: error: There was an error executing ["sudo", "lxc-create", "--template", "vagrant-tmp-blah-1373249959", "--name", "blah-1373249959", "--", "--arch", "amd64", "--release", "quantal", "--tarball", "/home/balves/.vagrant.d/boxes/quantal64-lxc/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/keys/vagrant.pub"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
There was an error executing ["sudo", "lxc-create", "--template", "vagrant-tmp-blah-1373249959", "--name", "blah-1373249959", "--", "--arch", "amd64", "--release", "quantal", "--tarball", "/home/balves/.vagrant.d/boxes/quantal64-lxc/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.2.2/keys/vagrant.pub"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.


Am I missing a package?

@fgrehm

This comment has been minimized.

Copy link
Owner

commented Jul 8, 2013

@bryanalves hey there, I'm not sure what's going on over there as I have never used lxc / vagrant-lxc on Arch Linux before but I suspect that you might have more luck with the upcoming 0.4.0 version of the plugin and the new boxes that I'm building right now.

from the logs it looks like your problem is actually the current lxc template that tries to add the vagrant user while creating the container:

DEBUG subprocess: stderr: chroot: failed to run command ‘useradd’: No such file or directory

the new boxes will have that as part of the build process and I hope it fixes your issue. expect 0.4.0 and the new boxes to be released at any time this week :)

@iwinux

This comment has been minimized.

Copy link

commented Jul 8, 2013

@fgrehm @bryanalves

In Short: It's the PATH that causes the problem.

Details: chroot takes the host's environment variables into the container, and for some weird reasons /bin and /sbin are missing from PATH in Arch Linux, so the script invoking useradd cannot find where it is.

Solution (just confirmed on my machine): add the following line to lxc-template (shipped with those lxc boxes):

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
@fgrehm

This comment has been minimized.

Copy link
Owner

commented Jul 8, 2013

@iwinux tks for the help :)

@bryanalves would you mind trying out that solution? I really think that the new boxes should not need this baked in the templates but you'd need to wait until I'm able to release them in order to try it out

@bryanalves

This comment has been minimized.

Copy link
Author

commented Jul 8, 2013

That got me further along in the process, now it seems that eth0 isn't getting created inside of the container:


INFO subprocess: Starting process: ["sudo", "lxc-attach", "--name", "blah-1373318722", "--namespaces", "NETWORK", "--", "/sbin/ip", "-4", "addr", "show", "scope", "global", "eth0"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stderr: Device "eth0" does not exist.
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 1


@fgrehm

This comment has been minimized.

Copy link
Owner

commented Jul 8, 2013

thats pretty weird, @iwinux did you experience that?

@bryanalves what version of Arch Linux are you using? have u got access to a pre built vagrant box with the same version so that I can try to dig into the problem down here?

@bryanalves

This comment has been minimized.

Copy link
Author

commented Jul 9, 2013

Arch Linux doesn't have versions; it's rolling release. Here are some relevant version numbers. Let me know if there's anything else you need that might be helpful.

Vagrant 1.2.2
Vagrant-lxc 0.3.4
Kernel 3.9.8.1
LXC 0.9.0

I'm using your prebuilt quantal64 box.

@fgrehm

This comment has been minimized.

Copy link
Owner

commented Jul 9, 2013

oh, my bad, didn't know about Arch Linux rolling releases :P

anyways, when I asked about a pre built vagrant box I forgot to mention that I'm actually looking for a VirtualBox pre built vagrant machine to make my life easier when digging into this :) last time I looked around could only find 2 boxes on http://www.vagrantbox.es/ but they seem to be outdated (the most recent one is from just over one year ago).

when dealing with ubuntu hosts, I usually point users to this gist that sets up an Ubuntu Quantal VBox VM ready for vagrant-lxc usage, if you are able to put up something similar to that for an Arch Linux host it will be perfect, otherwise it might take longer for me to dig into this =/

@iwinux

This comment has been minimized.

Copy link

commented Jul 9, 2013

no idea what happened to eth0...I was able to set up a precise64 box without other problems.

@bryanalves for further info, would you take a look at /etc/lxc/default.conf?

@bryanalves

This comment has been minimized.

Copy link
Author

commented Jul 9, 2013

file does not exist.
Tried creating a blank one.
Also tried adding


lxc.network.type = veth


Notice that a veth interface gets created on host with an arbitrary name. No bridge interface seems to get created though. Running lxc-attach manually shows that eth0 exists, but is down. ifconfig eth0 up brings it up but it's not connected to anything (dhcp fails, setting static IP manually causes it to not route).

Will work on getting an updated archlinux vbox vagrant box up soon.

@iwinux

This comment has been minimized.

Copy link

commented Jul 9, 2013

what about

lxc.network.type = empty
@fgrehm

This comment has been minimized.

Copy link
Owner

commented Jul 9, 2013

so, my networking skills are kinda limited ATM (and that explains is why there are quite a few open issues about it) but I remember that once I gave a shot at running vagrant-lxc on a debian host and I had to manually bring an lxcbr0 up as it was not present

it was a long time ago so I'm not sure if it still works but here is a gist with the things I had to do

@bryanalves would you be able to bring a bridge up and trying again?

@iwinux did you have to do anything related to that over there?

@bryanalves

This comment has been minimized.

Copy link
Author

commented Jul 10, 2013

So I did some experimentation with setting up the bridge myself, and had some mixed success.

I'm (usually) on wireless, and most wlan drivers don't support being added to a bridge for various reasons. This MAY be the cause of some of the failure to auto config previously; when I get time I will experiment some more with a wired connection.

On a positive note, I was able to set up a NAT connection that worked for my needs. The following steps were necessary on the host to get pre set-up:


modprobe bridge
brctl addbr br0
brctl setfd br0 0

ifconfig br0 192.168.100.1

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE


After this, it was required to configure an ip address manually in my Vagrantfile, along with a default route:


config.vm.provider :lxc do |lxc|
lxc.customize 'network.ipv4', '192.168.100.100/24'
end

config.vm.provision :shell, :inline => "route add default gw 192.168.100.1 eth0"
#other provisioning for resolve.conf, etc here


Trying to accomplish the above with "config.vm.network :private_network" was not successful. This might be a bug. Maybe there is some provider-specific config you can add to better facilitate NAT-based networking instead of bridged networking?

Besides testing with bridged eth0 on host instead of wlan0, is there anything else I can help test here? It seems like there are 2 totally separate issues here:

  • semi-legit bug with PATH in lxc-template
  • inability to easily configure NAT-based networking of containers
@iwinux

This comment has been minimized.

Copy link

commented Jul 10, 2013

@fgrehm yeah, for netowork access inside the container I need to do some NAT-related work

@renato-zannon

This comment has been minimized.

Copy link

commented Jul 19, 2013

Hi! Just a heads up, I was able to bring up the quantal64 box up without any Vagrant configuration.
I tried to reproduce an Ubuntu-like network environment, by creating the lxcbr0 bridge and making a dnsmasq listen on it.

I made it by creating a systemd unit, but I guess it would work if started by hand or on a script as well.

First, create the /etc/systemd/system/lxc-network.service file, to bring up the bridge and set up the forwarding:

[Unit]
Description=Bridge interface for LXC Containers

[Service]
Type=oneshot

# Bring up bridge interface
ExecStart=/sbin/brctl addbr lxcbr0
ExecStart=/sbin/ip address add 192.168.150.1/24 dev lxcbr0
ExecStart=/sbin/ip link set lxcbr0 up

# Setup IP forwarding
ExecStart=/bin/echo 1 > /proc/sys/net/ipv4/ip_forward
ExecStart=/sbin/iptables        -A FORWARD     -i lxcbr0 -j ACCEPT
ExecStart=/sbin/iptables -t nat -A POSTROUTING -o wlan0  -j MASQUERADE

#Workaround dhclient bugs on debian 7
ExecStart=/sbin/iptables -t mangle -A POSTROUTING -p udp --dport bootpc -j CHECKSUM --checksum-fill

RemainAfterExit=yes

# Undo forwarding
ExecStop=/sbin/iptables -t mangle -D POSTROUTING -p udp --dport bootpc -j CHECKSUM --checksum-fill
ExecStop=/sbin/iptables        -D FORWARD     -i lxcbr0 -j ACCEPT
ExecStop=/sbin/iptables -t nat -D POSTROUTING -o wlan0  -j MASQUERADE

# Bring bridge interface down
ExecStop=/sbin/ip link set lxcbr0 down
ExecStop=/sbin/brctl delbr lxcbr0

Then, we also need a dnsmasq instance to listen on the interface, to give out IPs for the containers. Create the /etc/systemd/system/lxc-dhcp.service file:

[Unit]
Requires=lxc-network.service
Requires=sys-devices-virtual-net-lxcbr0.device
After=sys-devices-virtual-net-lxcbr0.device

[Service]
ExecStart=/sbin/dnsmasq \
            --dhcp-leasefile=/var/run/lxc-dnsmasq.leases \
            --user=dnsmasq \
            --group=dnsmasq \
            --keep-in-foreground \
            --listen-address=192.168.150.1 \
            --except-interface=lo \
            --bind-interfaces \
            --dhcp-range=192.168.150.2,192.168.150.254

[Install]
WantedBy=default.target

If there's another dnsmasq instance running on the same machine (for DNS caching, for example), it's important to enable the bind-interfaces option on the /etc/dnsmasq.conf file, otherwise the two instances will conflict.

To bring both up, just run systemctl start lxc-dhcp. Then, the lxcbr0 interface should show up on ifconfig.

At last, let's modify the default configuration for lxc on /etc/lxc/default.conf to use the bridge we just set up:

lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.ipv4 = 0.0.0.0/24

For me at least, vagrant up works okay after that! No manual routes or hardcoded IPs needed :)

@fgrehm

This comment has been minimized.

Copy link
Owner

commented Jul 19, 2013

@Riccieri that's AWESOME! 🎆 I'll give it ago when I have a chance and will create a Wiki page with this info if everything goes fine :)
TKS A LOT! 🍻 🍻 🍻 🍻

@renato-zannon

This comment has been minimized.

Copy link

commented Jul 19, 2013

Great :) I'll try to reproduce this on a vanilla Arch this weekend

@fgrehm

This comment has been minimized.

Copy link
Owner

commented Jul 29, 2013

Closing in favor of #123

@anchoo2kewl

This comment has been minimized.

Copy link

commented Nov 24, 2013

I just ran into a similar issue, and what's odd is that I'm running a Ubuntu 13.10

Here's the output from my debug:-

INFO global: Vagrant version: 1.3.5
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/providers/virtualbox/plugin.rb
INFO manager: Registered plugin: VirtualBox provider
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/resume/plugin.rb
INFO manager: Registered plugin: resume command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/halt/plugin.rb
INFO manager: Registered plugin: halt command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/package/plugin.rb
INFO manager: Registered plugin: package command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/status/plugin.rb
INFO manager: Registered plugin: status command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/ssh_config/plugin.rb
INFO manager: Registered plugin: ssh-config command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/suspend/plugin.rb
INFO manager: Registered plugin: suspend command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/reload/plugin.rb
INFO manager: Registered plugin: reload command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/destroy/plugin.rb
INFO manager: Registered plugin: destroy command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/help/plugin.rb
INFO manager: Registered plugin: help command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/provision/plugin.rb
INFO manager: Registered plugin: provision command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/plugin.rb
INFO manager: Registered plugin: plugin command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/init/plugin.rb
INFO manager: Registered plugin: init command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/box/plugin.rb
INFO manager: Registered plugin: box command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/ssh/plugin.rb
INFO manager: Registered plugin: ssh command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/up/plugin.rb
INFO manager: Registered plugin: up command
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/communicators/ssh/plugin.rb
INFO manager: Registered plugin: ssh communicator
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/kernel_v2/plugin.rb
INFO manager: Registered plugin: kernel
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/provisioners/ansible/plugin.rb
INFO manager: Registered plugin: ansible
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/provisioners/puppet/plugin.rb
INFO manager: Registered plugin: puppet
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/provisioners/cfengine/plugin.rb
INFO manager: Registered plugin: CFEngine Provisioner
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/provisioners/salt/plugin.rb
INFO manager: Registered plugin: salt
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/provisioners/file/plugin.rb
INFO manager: Registered plugin: file
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/provisioners/shell/plugin.rb
INFO manager: Registered plugin: shell
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/provisioners/chef/plugin.rb
INFO manager: Registered plugin: chef
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/kernel_v1/plugin.rb
INFO manager: Registered plugin: kernel
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/solaris11/plugin.rb
INFO manager: Registered plugin: Solaris 11 guest.
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/linux/plugin.rb
INFO manager: Registered plugin: Linux guest.
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/openbsd/plugin.rb
INFO manager: Registered plugin: OpenBSD guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/solaris/plugin.rb
INFO manager: Registered plugin: Solaris guest.
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/omnios/plugin.rb
INFO manager: Registered plugin: OmniOS guest.
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/redhat/plugin.rb
INFO manager: Registered plugin: RedHat guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/suse/plugin.rb
INFO manager: Registered plugin: SUSE guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/esxi/plugin.rb
INFO manager: Registered plugin: ESXi guest.
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/darwin/plugin.rb
INFO manager: Registered plugin: Darwin guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/fedora/plugin.rb
INFO manager: Registered plugin: Fedora guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/pld/plugin.rb
INFO manager: Registered plugin: PLD Linux guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/coreos/plugin.rb
INFO manager: Registered plugin: CoreOS guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/ubuntu/plugin.rb
INFO manager: Registered plugin: Ubuntu guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/debian/plugin.rb
INFO manager: Registered plugin: Debian guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/freebsd/plugin.rb
INFO manager: Registered plugin: FreeBSD guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/arch/plugin.rb
INFO manager: Registered plugin: Arch guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/guests/gentoo/plugin.rb
INFO manager: Registered plugin: Gentoo guest
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/bsd/plugin.rb
INFO manager: Registered plugin: BSD host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/linux/plugin.rb
INFO manager: Registered plugin: Linux host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/redhat/plugin.rb
INFO manager: Registered plugin: Red Hat host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/slackware/plugin.rb
INFO manager: Registered plugin: Slackware host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/opensuse/plugin.rb
INFO manager: Registered plugin: OpenSUSE host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/freebsd/plugin.rb
INFO manager: Registered plugin: FreeBSD host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/arch/plugin.rb
INFO manager: Registered plugin: Arch host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/windows/plugin.rb
INFO manager: Registered plugin: Windows host
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/hosts/gentoo/plugin.rb
INFO manager: Registered plugin: Gentoo host
INFO vagrant: vagrant invoked: ["up", "--provider=lxc"]
DEBUG vagrant: Creating Vagrant environment
INFO environment: Environment initialized (#Vagrant::Environment:0x000000014f3318)
INFO environment: - cwd: /home/anshuman/vagrant/lxc_ubuntu_12.10
INFO environment: Home path: /home/anshuman/.vagrant.d
INFO environment: Local data path: /home/anshuman/.vagrant
DEBUG environment: Creating: /home/anshuman/.vagrant
DEBUG environment: Loading plugins from: /home/anshuman/.vagrant.d/plugins.json
INFO environment: Loading plugin from JSON: vagrant-lxc
INFO manager: Registered plugin: vagrant-lxc
INFO environment: Running hook: environment_load
INFO environment: Initializing config...
INFO loader: Set :default = "/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/config/default.rb"
DEBUG loader: Populating proc cache for "/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/config/default.rb"
DEBUG loader: Load procs for pathname: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/config/default.rb
INFO loader: Set :root = #Pathname:/home/anshuman/Vagrantfile
DEBUG loader: Populating proc cache for #Pathname:/home/anshuman/Vagrantfile
DEBUG loader: Load procs for pathname: /home/anshuman/Vagrantfile
INFO loader: Loading configuration in order: [:default, :home, :root]
DEBUG loader: Loading from: default (evaluating)
DEBUG loader: Loading from: root (evaluating)
DEBUG loader: Configuration loaded successfully, finalizing and returning
DEBUG hosts: Host path search classes: [VagrantPlugins::HostGentoo::Host, VagrantPlugins::HostWindows::Host, VagrantPlugins::HostArch::Host, VagrantPlugins::HostFreeBSD::Host, VagrantPlugins::HostRedHat::Host, VagrantPlugins::HostSlackware::Host, VagrantPlugins::HostOpenSUSE::Host, VagrantPlugins::HostLinux::Host, VagrantPlugins::HostBSD::Host]
INFO hosts: Host class: VagrantPlugins::HostLinux::Host
INFO runner: Running action: #Vagrant::Action::Builder:0x00000001af2250
INFO cli: CLI: [] "up" ["--provider=lxc"]
DEBUG cli: Invoking command class: VagrantPlugins::CommandUp::Command ["--provider=lxc"]
DEBUG command: 'Up' each target VM...
DEBUG command: Getting target VMs for command. Arguments:
DEBUG command: -- names: []
DEBUG command: -- options: {:provider=>"lxc"}
DEBUG command: Loading all machines...
INFO environment: Getting machine: default (lxc)
INFO environment: Uncached load of machine.
INFO loader: Set :vm_default = []
INFO loader: Loading configuration in order: [:default, :home, :root, :vm_default]
DEBUG loader: Loading from: default (cache)
DEBUG loader: Loading from: root (cache)
DEBUG loader: Configuration loaded successfully, finalizing and returning
INFO box_collection: Searching for box: quantal64 (lxc) in /home/anshuman/.vagrant.d/boxes/quantal64/lxc/metadata.json
INFO box_collection: Box found: quantal64 (lxc)
INFO machine: Initializing machine: default
INFO machine: - Provider: Vagrant::LXC::Provider
INFO machine: - Box: #Vagrant::Box:0x00000001b18568
INFO machine: - Data dir: /home/anshuman/.vagrant/machines/default/lxc
DEBUG lxc: Instantiating the container for: nil
INFO command: With machine: default (LXC (new VM))
INFO interface: info: Bringing machine 'default' up with 'lxc' provider...
Bringing machine 'default' up with 'lxc' provider...
INFO batch_action: Enabling parallelization by default.
INFO batch_action: Batch action will parallelize: true
INFO batch_action: Starting action: #Vagrant::Machine:0x00000001ff2750 up {:destroy_on_error=>true, :parallel=>true, :provision_ignore_sentinel=>false, :provision_types=>nil, :provider=>"lxc"}
INFO machine: Calling action: up on provider LXC (new VM)
INFO runner: Running action: #Vagrant::Action::Builder:0x000000020ec908
INFO warden: Calling IN action: #Vagrant::Action::Builtin::ConfigValidate:0x00000001f75110
INFO warden: Calling IN action: #Vagrant::Action::Builtin::Call:0x00000001f75048
INFO runner: Running action: #Vagrant::Action::Builder:0x000000021f07c8
INFO warden: Calling IN action: #Vagrant::LXC::Action::Created:0x000000021f66c8
INFO warden: Calling OUT action: #Vagrant::LXC::Action::Created:0x000000021f66c8
INFO runner: Running action: #Vagrant::Action::Warden:0x00000002221a58
INFO warden: Calling IN action: #Vagrant::Action::Builtin::HandleBoxUrl:0x000000022219e0
INFO handle_box_url: Skipping HandleBoxUrl because box or box_url not set.
INFO warden: Calling IN action: #Vagrant::LXC::Action::HandleBoxMetadata:0x00000002222d18
INFO interface: info: Importing base box 'quantal64'...
[default] Importing base box 'quantal64'...
DEBUG handle_box_metadata: Validating box contents
DEBUG handle_box_metadata: Setting box options on environment
INFO warden: Calling IN action: #Vagrant::LXC::Action::Create:0x000000022239e8
INFO driver: Copying LXC template into place
INFO subprocess: Starting process: ["/usr/bin/sudo", "cp", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/lxc-template", "/usr/share/lxc/templates/lxc-vagrant-tmp-anshuman_default-1385262872"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO subprocess: Starting process: ["/usr/bin/sudo", "chmod", "+x", "/usr/share/lxc/templates/lxc-vagrant-tmp-anshuman_default-1385262872"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
DEBUG driver: Creating container...
INFO subprocess: Starting process: ["/usr/bin/sudo", "lxc-create", "--template", "vagrant-tmp-anshuman_default-1385262872", "--name", "anshuman_default-1385262872", "-f", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/lxc.conf", "--", "--tarball", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/keys/vagrant.pub"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stderr: getopt: unrecognized option '--rootfs=/usr/lib/x86_64-linux-gnu/lxc'
DEBUG subprocess: stderr: lxc-create: container creation template for anshuman_default-1385262872 failed

DEBUG subprocess: stderr: lxc-create: Error creating container anshuman_default-1385262872
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 1
INFO driver: Removing LXC template
INFO subprocess: Starting process: ["/usr/bin/sudo", "rm", "/usr/share/lxc/templates/lxc-vagrant-tmp-anshuman_default-1385262872"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
ERROR warden: Error occurred: There was an error executing ["sudo", "lxc-create", "--template", "vagrant-tmp-anshuman_default-1385262872", "--name", "anshuman_default-1385262872", "-f", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/lxc.conf", "--", "--tarball", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/keys/vagrant.pub"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
ERROR warden: Error occurred: There was an error executing ["sudo", "lxc-create", "--template", "vagrant-tmp-anshuman_default-1385262872", "--name", "anshuman_default-1385262872", "-f", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/lxc.conf", "--", "--tarball", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/keys/vagrant.pub"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
INFO warden: Beginning recovery process...
INFO warden: Calling recover: #Vagrant::Action::Builtin::Call:0x00000001f75048
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO environment: Running hook: environment_unload
INFO runner: Running action: #Vagrant::Action::Builder:0x00000001893bf8
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<Vagrant::Errors::BatchMultiError: 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:

There was an error executing ["sudo", "lxc-create", "--template", "vagrant-tmp-anshuman_default-1385262872", "--name", "anshuman_default-1385262872", "-f", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/lxc.conf", "--", "--tarball", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/keys/vagrant.pub"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.>
ERROR vagrant: 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:

There was an error executing ["sudo", "lxc-create", "--template", "vagrant-tmp-anshuman_default-1385262872", "--name", "anshuman_default-1385262872", "-f", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/lxc.conf", "--", "--tarball", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/keys/vagrant.pub"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
ERROR vagrant: /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/batch_action.rb:109:in run' /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/environment.rb:209:inblock (2 levels) in batch'
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/environment.rb:204:in tap' /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/environment.rb:204:inblock in batch'
internal:prelude:10:in synchronize' /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/environment.rb:203:inbatch'
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/up/command.rb:51:in execute' /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/cli.rb:38:inexecute'
/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/environment.rb:478:in cli' /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/bin/vagrant:96:in<top (required)>'
/opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in load' /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in

'
INFO interface: 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:

There was an error executing ["sudo", "lxc-create", "--template", "vagrant-tmp-anshuman_default-1385262872", "--name", "anshuman_default-1385262872", "-f", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/lxc.conf", "--", "--tarball", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/keys/vagrant.pub"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
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:

There was an error executing ["sudo", "lxc-create", "--template", "vagrant-tmp-anshuman_default-1385262872", "--name", "anshuman_default-1385262872", "-f", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/lxc.conf", "--", "--tarball", "/home/anshuman/.vagrant.d/boxes/quantal64/lxc/rootfs.tar.gz", "--auth-key", "/opt/vagrant/embedded/gems/gems/vagrant-1.3.5/keys/vagrant.pub"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.

@fgrehm

This comment has been minimized.

Copy link
Owner

commented Nov 25, 2013

@anchoo2kewl I suspect you are using an old base box (possible one from july that was referenced on the readme that I have just updated). please try using a newer box and let us know if you still have issues ;)

@anchoo2kewl

This comment has been minimized.

Copy link

commented Nov 25, 2013

Yes, it was an issue with the base box. Thanks a lot.

@klardotsh

This comment has been minimized.

Copy link

commented Sep 23, 2014

@renato-zannon I'm unable to access the outside world in my VM using the configs you specified (modified to use wlp1s0 instead of wlan0). I can SSH into the box, but can't do any outside-world tasks (pulling packages, curl google.com, etc)

This is using the latest everything involved, wheezy64 base box, Arch Linux.

Any ideas?

@malaniz

This comment has been minimized.

Copy link

commented Sep 19, 2016

I'm having the same problem @iv597 Do you fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.