Lxc.net vs. lxc.network - what's the difference between?

A question regarding the documentation on https://linuxcontainers.org/lxc/manpages//man5/lxc.container.conf.5.html

the network section is always called “lxc.net.[i]” but e.g. on Debian it’s only working with the settings lxc.network.[i]

what’s the difference between those keys?


The documentation on the website is generated from the current code tree.
Current LXC git and the future LXC 2.1 will come with quite a number of the config keys renamed or removed which is what you’re seeing on the website.

It’s usually best to look at the manpage for the system you’re using LXC on “man lxc.container.conf” will show you the supported configuration keys for your system.

LXC 2.1 will be backward compatible with 2.0 but issue warnings about the renamed and deprecated configuration keys so you can update your config accordingly.

@brauner any chance we can have a script that will convert an old config to a new one?

thank you for the fast feedback and the explanations :slight_smile:
Is it possible to have version hint somewhere on the documentation?

or even better: generate the documentation for all versions:

edit: it would be also good to have the latest “stable” documentation as default

edit2: tried man lxc.container.conf on Debian 8 with lxc 2.0.7.
There is no hint for the network indexes with [i] - but it’s working?

Hi, we recently merged https://github.com/lxc/lxc/pull/1750/commits/555200a6f4497215a566cb0c162d3b61afdace66 which includes an update script. This will allow you to update your configuration to the new LXC 2.1 format.

1 Like