fgrehm/vagrant-lxc

Archlinux Bug.

Closed this issue · 2 comments

Hi, I don't know why after an update in Archlinux i get this error:

/opt/vagrant/embedded/gems/gems/vagrant-1.8.7/lib/vagrant/machine.rb:186:in `action'
/opt/vagrant/embedded/gems/gems/vagrant-1.8.7/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
 INFO interface: error: There was an error executing ["sudo", "/usr/local/bin/vagrant-lxc-wrapper", "lxc-create", "-B", "best", "--template", "/home/malaniz/.vagrant.d/gems/gems/vagrant-lxc-1.2.1/scripts/lxc-template", "--name", "vagrant_default_1480430502688_74592", "--", "--tarball", "/home/malaniz/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-trusty64-lxc/1.2.0/lxc/rootfs.tar.gz", "--config", "/home/malaniz/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-trusty64-lxc/1.2.0/lxc/lxc-config"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
There was an error executing ["sudo", "/usr/local/bin/vagrant-lxc-wrapper", "lxc-create", "-B", "best", "--template", "/home/malaniz/.vagrant.d/gems/gems/vagrant-lxc-1.2.1/scripts/lxc-template", "--name", "vagrant_default_1480430502688_74592", "--", "--tarball", "/home/malaniz/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-trusty64-lxc/1.2.0/lxc/rootfs.tar.gz", "--config", "/home/malaniz/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-trusty64-lxc/1.2.0/lxc/lxc-config"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
 INFO interface: Machine: error-exit ["Vagrant::LXC::Errors::ExecuteError", "There was an error executing [\"sudo\", \"/usr/local/bin/vagrant-lxc-wrapper\", \"lxc-create\", \"-B\", \"best\", \"--template\", \"/home/malaniz/.vagrant.d/gems/gems/vagrant-lxc-1.2.1/scripts/lxc-template\", \"--name\", \"vagrant_default_1480430502688_74592\", \"--\", \"--tarball\", \"/home/malaniz/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-trusty64-lxc/1.2.0/lxc/rootfs.tar.gz\", \"--config\", \"/home/malaniz/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-trusty64-lxc/1.2.0/lxc/lxc-config\"]\n\nFor more information on the failure, enable detailed logging by setting\nthe environment variable VAGRANT_LOG to DEBUG."]

When i try to make that command i get this:

sudo /usr/local/bin/vagrant-lxc-wrapper lxc-create -B best --template
/home/malaniz/.vagrant.d/gems/gems/vagrant-lxc-1.2.1/scripts/lxc-template --name vagrant_default_1480430502688_74592 -- --tarball /home/malaniz/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-trusty64-lxc/1.2.0/lxc/rootfs.tar.gz --config /home/malaniz/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-trusty64-lxc/1.2.0/lxc/lxc-config
lxc-create: parse.c: lxc_file_for_each_line: 57 Failed to parse config: lxc.autodev = true

File descriptor 3 (/var/lib/lxc/vagrant_default_1480430502688_74592/partial) leaked on lvcreate invocation. Parent PID 25809: /usr/bin/lxc-create
  Volume group "lxc" not found
  Cannot process volume group lxc
lxc-create: bdev/lxclvm.c: lvm_create: 402 Error creating new lvm blockdev /dev/lxc/vagrant_default_1480430502688_74592 size 1073741824 bytes
lxc-create: parse.c: lxc_file_for_each_line: 57 Failed to parse config: lxc.autodev = true

lxc-create: tools/lxc_create.c: main: 318 Error creating container vagrant_default_1480430502688_74592

my current Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "fgrehm/trusty64-lxc"
  config.vm.network :forwarded_port, guest: 3000, host: 3000, host_ip: "0.0.0.0"
  config.vm.network :forwarded_port, guest: 3002, host: 3002
  config.vm.synced_folder "../", "/host"
end

Hey
try changing
lxc.autodev = true
to
lxc.autodev = 1
in /etc/lxc/default.conf

This seems like a solved issue