I am trying to setup an LXC container (debian) as a Kubernetes node.
I am so far that the only thing in the way is the kubeadm init script…
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR SystemVerification]: failed to parse kernel config: unable to load kernel module: "configs", output: "modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/5.4.44-2-pve/modules.dep.bin'nmodprobe: FATAL: Module configs not found in directory /lib/modules/5.4.44-2-pven", err: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
After some research I figured out that I probably need to add the following: linux.kernel_modules: ip_tables,ip6_tables,netlink_diag,nf_nat,overlay
But adding this to /etc/pve/lxc/107.conf
doesn’t do anything.
Does anybody have a clue how to add the linux kernel modules?
3
Answers
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:
You can follow this guide from K3s too. Basically:
and
✌️
To allow load with modprobe any modules inside privileged proxmox lxc container, you need add this options to container config:
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:For the fix
[ERROR SystemVerification]: failed to parse kernel config
run from the host:Where
$VMID
is your container id.