[DRE-maint] Bug#925307: vagrant-lxc: Network broken with lxc's default configuration
Benjamin Moody
benjamin.moody at gmail.com
Fri Mar 22 19:32:59 GMT 2019
Package: vagrant-lxc
Version: 1.2.1-3
Severity: normal
Dear Maintainer,
With the default configuration of the lxc package, vagrant-lxc does
not work, apparently because the container does not have a network
interface by default. It simply gives an error message such as:
There was an error executing ["sudo", "/usr/bin/env", "lxc-attach", "--name", "vagrant_default_1553281852428_28054", "--namespaces", "NETWORK|MOUNT", "--", "/sbin/ip", "-4", "addr", "show", "scope", "global", "eth0"]
I was able to work around this by following the instructions at
<https://wiki.debian.org/LXC#Minimal_changes_networking_in_.2BIBw-stretch.2BIB0->:
- create /etc/default/lxc-net containing
USE_LXC_BRIDGE="true"
- create /etc/lxc/default.conf containing
lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:xx:xx:xx
- run 'service lxc-net restart'
However, it took a bit of tinkering to figure out that this was
necessary (probably because I'm not very familiar with lxc.)
Preferably, the vagrant-lxc package should do whatever is needed to
configure virtual networking for its own containers, independent of
lxc's configuration; or at least, it should document the required
configuration steps in README.Debian.
-- System Information:
Debian Release: 9.8
APT prefers stable
APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'stable-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-8-amd64 (SMP w/40 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages vagrant-lxc depends on:
ii lxc 1:2.0.7-2+deb9u2
ii redir 3.1-1~exp1
ii ruby 1:2.3.3
ii sudo 1.8.19p1-2.1
ii vagrant 1.9.1+dfsg-1+deb9u2
vagrant-lxc recommends no packages.
vagrant-lxc suggests no packages.
-- no debconf information
More information about the Pkg-ruby-extras-maintainers
mailing list