I followed this guide to install the necessary kernel modules into my PVE host, the module seems to be loaded and "modprobe wiregard" returns no errors.
On LXC config (from another post recommended to map /lib/modules folder as bind mount. Still doesn't see the files?
Trying to find modules within LXC
On the LXC container:
On LXC config (from another post recommended to map /lib/modules folder as bind mount. Still doesn't see the files?
root@pve:/lib/modules/5.4.78-2-pve# uname -a
Linux pve 5.4.78-2-pve #1 SMP PVE 5.4.78-2 (Thu, 03 Dec 2020 14:26:17 +0100) x86_64 GNU/Linux
root@pve:/lib/modules/5.4.78-2-pve# ls /lib/modules/5.4.7
5.4.73-1-pve/ 5.4.78-2-pve/
root@pve:/lib/modules/5.4.78-2-pve# ls /lib/modules/5.4.78-2-pve/modules.dep.bin
/lib/modules/5.4.78-2-pve/modules.dep.bin
root@pve:/lib/modules/5.4.78-2-pve# ls /lib/modules/5.4.78-2-pve/modules.dep.bi^C
root@pve:/lib/modules/5.4.78-2-pve# pct config 129
arch: amd64
cores: 4
hostname: rclone
memory: 1024
mp0: /gdata/docs,mp=/mnt/docs,ro=1
mp1: /gdata/data,mp=/mnt/data,ro=1
mp2: /gdata/tv,mp=/mnt/tv,ro=1
mp3: /gdata/movies,mp=/mnt/movies,ro=1
mp4: /gdata/music,mp=/mnt/music,ro=1
mp5: /lib/modules/5.4.78-2-pve,mp=/lib/modules/5.4.78-2-pve,ro=1
net0: name=eth0,bridge=vmbr3,firewall=1,hwaddr=B2:69:98:84:E9:20,ip=dhcp,ip6=auto,rate=1.3,type=veth
onboot: 1
ostype: debian
rootfs: gdata-zfs:subvol-129-disk-0,size=10G
swap: 512
Trying to find modules within LXC
root@pve:/lib/modules/5.4.78-2-pve# pct enter 129
root@rclone:/# ls -lah /lib/modules/4.19.0-13-amd64/
build/ modules.alias.bin modules.dep modules.devname modules.symbols source/
modules.alias modules.builtin.bin modules.dep.bin modules.softdep modules.symbols.bin updates/
root@rclone:/# ls -lah /lib/modules/
total 18K
drwxr-xr-x 3 root root 3 Jan 15 09:41 .
drwxr-xr-x 11 root root 12 Jan 15 09:41 ..
drwxr-xr-x 3 root root 14 Jan 15 09:45 4.19.0-13-amd64
On the LXC container:
root@rclone:/# modprobe wireguard
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/5.4.78-2-pve/modules.dep.bin'
modprobe: FATAL: Module wireguard not found in directory /lib/modules/5.4.78-2-pve
root@rclone:/# uname -a
Linux rclone 5.4.78-2-pve #1 SMP PVE 5.4.78-2 (Thu, 03 Dec 2020 14:26:17 +0100) x86_64 GNU/Linux
root@rclone:/# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@rclone:/# ls -lah /lib/modules/4.19.0-13-amd64/
build/ modules.alias.bin modules.dep modules.devname modules.symbols source/
modules.alias modules.builtin.bin modules.dep.bin modules.softdep modules.symbols.bin updates/
root@rclone:/# ls -lah /lib/modules/
total 18K
drwxr-xr-x 3 root root 3 Jan 15 09:41 .
drwxr-xr-x 11 root root 12 Jan 15 09:41 ..
drwxr-xr-x 3 root root 14 Jan 15 09:45 4.19.0-13-amd64
root@rclone:/#