Proxmox lxc add add linux.kernel_modules
I'm not sure what guide you are following but assuming that you have the required kernel modules on the host, this would do it:
lxc config set my-container linux.kernel_modules overlay
You can follow this guide from K3s too. Basically:
lxc config edit k3s-lxc
and
config: linux.kernel_modules: ip_tables,ip6_tables,netlink_diag,nf_nat,overlay raw.lxc: lxc.mount.auto=proc:rw sys:rw security.privileged: "true" security.nesting: "true"
✌️
To allow load with modprobe any modules inside privileged proxmox lxc container, you need add this options to container config:
lxc.apparmor.profile: unconfinedlxc.cgroup.devices.allow: alxc.cap.drop:lxc.mount.auto: proc:rw sys:rwlxc.mount.entry: /lib/modules lib/modules none bind 0 0
before that, you must first create the /lib/modules folder inside the container
For the fix ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file
run from the host:
pct set $VMID --mp0 /usr/lib/modules/$(uname -r),mp=/lib/modules/$(uname -r),ro=1,backup=0
For the fix [ERROR SystemVerification]: failed to parse kernel config
run from the host:
pct push $VMID /boot/config-$(uname -r) /boot/config-$(uname -r)
Where $VMID
is your container id.