[GH-ISSUE #30] Build for OpenWRT running under LXC #18

Closed
opened 2026-10-13 21:05:03 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @tkkost on GitHub (Apr 15, 2025).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-openwrt/issues/30

Hello.
I have a problem with a bulding ipk-files for OpenWRT 24.10.0, which runned under a LXC-container on the VPS-server (Ubuntu 24.04).

First, I've downloaded 3 ipk-files for x86_64 from https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.0.
It installed successfully, without any errors. But when I configured Amnezia-interfaces via luci, the interfaces didn't start.
The log in OpenWRT says something about missing kernel modules:

Mon Apr 14 12:03:14 2025 daemon.notice netifd: Interface 'Keenetic_Net' is setting up now
Mon Apr 14 12:03:14 2025 daemon.err modprobe: no module folders for kernel version 6.8.0-53-generic found
Mon Apr 14 12:03:14 2025 daemon.notice netifd: Keenetic_Net (1940): sh: -v: unknown operand
Mon Apr 14 12:03:14 2025 user.notice amneziawg: info: using user-space amneziawg-go for /usr/bin/amneziawg
Mon Apr 14 12:03:14 2025 daemon.notice netifd: Keenetic_Net (1940): ./amneziawg.sh: eval: line 200: amneziawg-go: not found
Mon Apr 14 12:03:14 2025 daemon.notice netifd: Keenetic_Net (1940): Unable to modify interface: Protocol not supported
Mon Apr 14 12:03:19 2025 daemon.err modprobe: no module folders for kernel version 6.8.0-53-generic found
Mon Apr 14 12:03:19 2025 daemon.notice netifd: Keenetic_Net (2007): ./amneziawg.sh: eval: line 298: proto_amneziawg_check_installed: not found
Mon Apr 14 12:03:19 2025 daemon.notice netifd: Keenetic_Net (2007): sh: -v: unknown operand
Mon Apr 14 12:03:19 2025 daemon.notice netifd: Interface 'Keenetic_Net' is now down

Kernel info:

~ # opkg info kernel
Package: kernel
Version: 6.6.73~a21259e4f338051d27a6443a3a7f7f1f-r1
Depends: libc
Status: install ok installed
Architecture: x86_64
Installed-Time: 1738624177

But it is OpenWRT in LXC, it uses host kernel:

~ # uname -a
Linux OpenWrt 6.8.0-53-generic #55-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 17 15:37:52 UTC 2025 x86_64 GNU/Linux

Later,
According to the instructions from https://github.com/itdoginfo/domain-routing-openwrt/wiki/Amnezia-WG-Build I tried to build my own Amnezia-modules for my platform. I used the "vermagic: a21259e4f338051d27a6443a3a7f7f1f-r1" from my OpenWRT, but the build stops with an error:

make[4]: Leaving directory '/home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73'
# If .config did not change, use the previous timestamp to avoid package rebuilds
cmp -s /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.config /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.config.modules.save && mv /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.config.modules.save /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.config; cp -fpR /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.config /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.config.modules.save
touch /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.modules
make -C image compile TARGET_BUILD=
make[4]: Entering directory '/home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/target/linux/x86/image'
make[4]: Nothing to be done for 'compile'.
make[4]: Leaving directory '/home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/target/linux/x86/image'
make[3]: Leaving directory '/home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/target/linux/x86'
make[2]: Leaving directory '/home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/target/linux'
time: target/linux/compile#6107.65#444.13#1670.25
make[1]: Leaving directory '/home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc'
Vermagic mismatch: a21259e4f338051d27a6443a3a7f7f1f, expected a21259e4f338051d27a6443a3a7f7f1f-r1
Error: Process completed with exit code 1.

I tried to use the "vermagic: a21259e4f338051d27a6443a3a7f7f1f", without "-r1", the build completed, but finally it didn't work, I received the same error in OpenWRT about missing kernel modules.
I tried to use the "vermagic: 6.8.0-53-generic SMP preempt mod_unload modversions" from the host, but the build doesn't complete with an error about SMP.
I'm a novice, and I don't understand all the process clearly, but I try the best.
Please help me to solve this problem.

I use OpenWRT-image version 24.10 for LXC from https://images.linuxcontainers.org/.
In the host system the kernel is:

~# uname -a
Linux 6.8.0-53-generic #55-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 17 15:37:52 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

I tried to install vanilla wireguard to OpenWRT via OPKG. It was built for kernel 6.6.73 and it works without any problem.

Originally created by @tkkost on GitHub (Apr 15, 2025). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-openwrt/issues/30 Hello. I have a problem with a bulding ipk-files for OpenWRT 24.10.0, which runned under a LXC-container on the VPS-server (Ubuntu 24.04). First, I've downloaded 3 ipk-files for x86_64 from https://github.com/Slava-Shchipunov/awg-openwrt/releases/tag/v24.10.0. It installed successfully, without any errors. But when I configured Amnezia-interfaces via luci, the interfaces didn't start. The log in OpenWRT says something about missing kernel modules: ``` Mon Apr 14 12:03:14 2025 daemon.notice netifd: Interface 'Keenetic_Net' is setting up now Mon Apr 14 12:03:14 2025 daemon.err modprobe: no module folders for kernel version 6.8.0-53-generic found Mon Apr 14 12:03:14 2025 daemon.notice netifd: Keenetic_Net (1940): sh: -v: unknown operand Mon Apr 14 12:03:14 2025 user.notice amneziawg: info: using user-space amneziawg-go for /usr/bin/amneziawg Mon Apr 14 12:03:14 2025 daemon.notice netifd: Keenetic_Net (1940): ./amneziawg.sh: eval: line 200: amneziawg-go: not found Mon Apr 14 12:03:14 2025 daemon.notice netifd: Keenetic_Net (1940): Unable to modify interface: Protocol not supported Mon Apr 14 12:03:19 2025 daemon.err modprobe: no module folders for kernel version 6.8.0-53-generic found Mon Apr 14 12:03:19 2025 daemon.notice netifd: Keenetic_Net (2007): ./amneziawg.sh: eval: line 298: proto_amneziawg_check_installed: not found Mon Apr 14 12:03:19 2025 daemon.notice netifd: Keenetic_Net (2007): sh: -v: unknown operand Mon Apr 14 12:03:19 2025 daemon.notice netifd: Interface 'Keenetic_Net' is now down ``` Kernel info: ``` ~ # opkg info kernel Package: kernel Version: 6.6.73~a21259e4f338051d27a6443a3a7f7f1f-r1 Depends: libc Status: install ok installed Architecture: x86_64 Installed-Time: 1738624177 ``` But it is OpenWRT in LXC, it uses host kernel: ``` ~ # uname -a Linux OpenWrt 6.8.0-53-generic #55-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 17 15:37:52 UTC 2025 x86_64 GNU/Linux ``` Later, According to the instructions from https://github.com/itdoginfo/domain-routing-openwrt/wiki/Amnezia-WG-Build I tried to build my own Amnezia-modules for my platform. I used the "vermagic: a21259e4f338051d27a6443a3a7f7f1f-r1" from my OpenWRT, but the build stops with an error: ``` make[4]: Leaving directory '/home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73' # If .config did not change, use the previous timestamp to avoid package rebuilds cmp -s /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.config /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.config.modules.save && mv /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.config.modules.save /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.config; cp -fpR /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.config /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.config.modules.save touch /home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.73/.modules make -C image compile TARGET_BUILD= make[4]: Entering directory '/home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/target/linux/x86/image' make[4]: Nothing to be done for 'compile'. make[4]: Leaving directory '/home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/target/linux/x86/image' make[3]: Leaving directory '/home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/target/linux/x86' make[2]: Leaving directory '/home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc/target/linux' time: target/linux/compile#6107.65#444.13#1670.25 make[1]: Leaving directory '/home/runner/work/awg-openwrt-lxc/awg-openwrt-lxc' Vermagic mismatch: a21259e4f338051d27a6443a3a7f7f1f, expected a21259e4f338051d27a6443a3a7f7f1f-r1 Error: Process completed with exit code 1. ``` I tried to use the "vermagic: a21259e4f338051d27a6443a3a7f7f1f", without "-r1", the build completed, but finally it didn't work, I received the same error in OpenWRT about missing kernel modules. I tried to use the "vermagic: 6.8.0-53-generic SMP preempt mod_unload modversions" from the host, but the build doesn't complete with an error about SMP. I'm a novice, and I don't understand all the process clearly, but I try the best. Please help me to solve this problem. I use OpenWRT-image version 24.10 for LXC from https://images.linuxcontainers.org/. In the host system the kernel is: ``` ~# uname -a Linux 6.8.0-53-generic #55-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 17 15:37:52 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux ``` I tried to install vanilla wireguard to OpenWRT via OPKG. It was built for kernel 6.6.73 and it works without any problem.
Author
Owner

@tkkost commented on GitHub (Apr 17, 2025):

I did it. I just built and installed AmneziaWg to the host. And after AmneziaWg begun to work in the LXC-container.

<!-- gh-comment-id:2812937763 --> @tkkost commented on GitHub (Apr 17, 2025): I did it. I just built and installed AmneziaWg to the host. And after AmneziaWg begun to work in the LXC-container.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-openwrt#18
No description provided.