Lxc.mount.entry = /proc/sys/net/bridge


(Zeroflaw) #1

I can’t seem to figure out how to mount the host proc/sys/net/bridge folder on the containers.
Ive attached a snippet of my profile of what i’m trying to do.

config:
  raw.lxc: |-
    lxc.mount.entry = /proc/sys/net/bridge proc/sys/net/bridge none bind 0 0
  security.nesting: "true"

Any help would be much appreciated.
Thanks


(Zeroflaw) #2

Ive worked out that I can mount directly onto /proc/sys/net/ and that works with the following config.

raw.lxc: |-
    lxc.mount.entry = /root/test proc/sys/net/ none bind,create=dir 0 0

The problem with that is it creates all the other folders (core ipv4 ipv6 netfilter unix), which isn’t what I want. The with “/root/test proc/sys/net/bridge” is its returns the error can’t make directory. Is there a way to mount to keep the existing folders?