1

everyone! I am a newcomer to linux kernel modules and I hope you can give me a helping hand. I am using Proxmox 5.4-4/97a96833, latest updates and kernel version 4.15.18-13-pve. I am running multiple LXC containers based on Ubuntu 18.04. Inside those I am trying to build a Docker swarm. Docker by itself runs without a problem, at least until now, but when I try to create a container in the swarm I get an error that states "please ensure that br_netfilter kernel module is loaded".

I've tried everything I could find on the internet, but I can't seem to make it work. Whenever I use lsmod the module doesn't show up in the list, modprobe does not give any input and modinfo says the module is not found. All of these commands were ran on the Proxmox host.

I also found a lot of posts mentioning a "lxc profile" command used to create an apparmor profile to allow this module, but I can't find an equivalent for it for Proxmox. When I try to install the LXC package is says that it needs to remove Proxmox packages, so that is a bust.

Any ideas on how I could fix this or pointing me into a direction would be much appreciated.

Denis Rendler
  • 193
  • 1
  • 1
  • 15
  • It seems that docker swarm currently can not be run inside lxc. Some discussions are there. [Docker Swarm in LXC, Part 1.5 - The Kerneling](https://remotephone.github.io/lab/homelab/proxmox/ansible/docker/workflow/2019/03/09/Docker-Swarm-in-LXC_Part-1.5.html), or [Swarm in LXD - issue with overlay network - Open Source Projects / Swarm - Docker Forums](https://forums.docker.com/t/swarm-in-lxd-issue-with-overlay-network/43021) – C.C. Hsu Jun 16 '19 at 12:57

1 Answers1

0
   sudo lxc config edit <lxc-container-name>

You will get an YAML Configuration for that Container.

In that config object,

add

   linux.kernel_modules: br_netfilter

and restart the lxc container, now you will get that kernel module.

You should do this for all those LXC Containers to which you want to form a swarm.

RajNikhil Marpu
  • 397
  • 2
  • 4
  • 19
  • thanks for the answer. unfortunately, proxmox overrides these commands with their own implementation it seems. because each time I try installing the lxc package, apt is asking me to remove packages from proxmox. :( – Denis Rendler Jul 25 '19 at 11:13