Page MenuHomePhabricator

vagrant-lxc is not compatible with LXC v2.1+ (e.g. Ubuntu 17.10)
Open, Needs TriagePublic


Followed the current directions in the docs file on a fresh Ubuntu 17.10 install, ended up with failure. Snippet from logs:

==> default: Importing base box 'LEAP/jessie'...
 INFO handle_box_metadata: Validating box contents
 INFO handle_box_metadata: Setting box options on environment
 INFO warden: Calling IN action: #<Vagrant::LXC::Action::Create:0x000000026dbc10>
DEBUG driver: Creating container...
 INFO subprocess: Starting process: ["/usr/bin/sudo", "/usr/local/bin/vagrant-lxc-wrapper", "lxc-create", "-B", "none", "--template", "/home/brion/.vagrant.d/gems/2.3.4/gems/vagrant-lxc-1.2.3/scripts/lxc-template", "--name", "vagrant_default_1508368715070_71502", "--", "--tarball", "/home/brion/.vagrant.d/boxes/LEAP-VAGRANTSLASH-jessie/1.2.5/lxc/rootfs.tar.gz", "--config", "/home/brion/.vagrant.d/boxes/LEAP-VAGRANTSLASH-jessie/1.2.5/lxc/lxc-config"]
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: Unpacking the rootfs
DEBUG subprocess: stderr: The configuration file contains legacy configuration keys.
Please update your configuration file!
lxc-create: vagrant_default_1508368715070_71502: confile.c: parse_line: 1982 Unknown configuration key "lxc.pivotdir"
lxc-create: vagrant_default_1508368715070_71502: parse.c: lxc_file_for_each_line: 58 Failed to parse config: lxc.pivotdir = lxc_putold

DEBUG subprocess: stderr: lxc-create: vagrant_default_1508368715070_71502: tools/lxc_create.c: main: 326 Error creating container vagrant_default_1508368715070_71502
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31995
DEBUG subprocess: Exit status: 1

Seems there's a new version of lxc going around that isn't compatible with the current config file? :(

Found upstream bug about this on vagrant-lxc plugin:

Event Timeline

brion created this task.Oct 18 2017, 11:30 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 18 2017, 11:30 PM
brion updated the task description. (Show Details)Oct 18 2017, 11:53 PM

Workaround seems to get the install going:

  • start the box setup with "vagrant up" until it fails
  • edit ~/.vagrant.d/boxes/LEAP-VAGRANTSLASH-jessie/1.2.5/lxc/lxc-config
  • comment out the line "lxc.kmsg = 0"
  • comment out the line "lxc.pivotdir = lxc_putold"
  • re-run "vagrant up"
bd808 renamed this task from MediaWiki-Vagrant with lxc fails on Ubuntu 17.10: Unknown configuration key "lxc.pivotdir" to vagrant-lxc is not compatible with LXC v2.1+ (e.g. Ubuntu 17.10).Dec 17 2017, 7:01 PM
bd808 added a project: Upstream.