proxmox why lxc in pve work so awful, fix it...

borgez

Active Member
Jan 29, 2018
3
0
41
36
trying much, and got error on start container...

Code:
features: keyctl=1,nesting=1
unprivileged: 1

Code:
pct set xxx --mp0 /lib/modules/$(uname -r),mp=/lib/modules/$(uname -r),ro=1


Code:
explicitly configured lxc.apparmor.profile overrides the following settings: features:fuse, features:nesting
/dev/rbd4
run_buffer: 314 Script exited with status 20
lxc_init: 798 Failed to run lxc.hook.pre-start for container "100120"
__lxc_start: 1945 Failed to initialize container "100120"
sid 0 hostid 100000 range 65536
INFO     lsm - lsm/lsm.c:lsm_init:40 - Initialized LSM security driver AppArmor
INFO     conf - conf.c:run_script_argv:331 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "100120", config section "lxc"
DEBUG    conf - conf.c:run_buffer:303 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 100120 lxc pre-start produced output: symlink encountered at: //lib

ERROR    conf - conf.c:run_buffer:314 - Script exited with status 20
ERROR    start - start.c:lxc_init:798 - Failed to run lxc.hook.pre-start for container "100120"
ERROR    start - start.c:__lxc_start:1945 - Failed to initialize container "100120"
INFO     conf - conf.c:run_script_argv:331 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "100120", config section "lxc"
startup for container '100120' failed
 
hi,

pct set xxx --mp0 /lib/modules/$(uname -r),mp=/lib/modules/$(uname -r),ro=1

why are you trying to mount the kernel modules? all kernel modules on host should already be available in the container (since the kernel is shared from host to CT)
 
hi,



why are you trying to mount the kernel modules? all kernel modules on host should already be available in the container (since the kernel is shared from host to CT)

When not copy it to vm, i have error when do modprobe br_netfilter, "/lib/modules/xxxxx not found" and errors in service

k3s required modprobe, and i want to run it without errors.

Code:
cat /etc/systemd/system/k3s.service

[Unit]
Description=Lightweight Kubernetes
Documentation=https://k3s.io
......
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
 
hi,



why are you trying to mount the kernel modules? all kernel modules on host should already be available in the container (since the kernel is shared from host to CT)
Second error, /dev/kmesg

lxc-pve: 4.0.6-2
lxcfs: 4.0.6-pve1

i wand do some like
Code:
lxc.mount.entry: /dev/kmsg dev/kmsg none defaults,bind,create=file
in this case i get
Code:
root@lxc:~# cat /dev/kmsg
cat: /dev/kmsg: Operation not permitted

or lxc.kmsg = 1
in lxc docs https://github.com/lxc/lxc/blob/104...37506/doc/ko/lxc.container.conf.sgml.in#L1024
Set this to 1 to enable /dev/kmsg symlinking.

it has, but when i try add it to my config i get error on start, why in not implemented in lxc-pve?
on what principle configs removed from lxc-pve?

Code:
pct start 100120 -d

parse_line: 2707 Invalid argument - Unknown configuration key "lxc.kmsg"
lxc_file_for_each_line_mmap: 132 Failed to parse config file "/var/lib/lxc/100120/config" at line "lxc.kmsg = 1"
Failed to load config for 100120
main: 242 Failed to create lxc_container
lxc_start - tools/lxc_start.c:main:242 - Failed to create lxc_container

in console
Code:
lxc-console: 100120: confile.c: parse_line: 2707 Invalid argument - Unknown configuration key "lxc.kmsg"
lxc-console: 100120: parse.c: lxc_file_for_each_line_mmap: 132 Failed to parse config file "/var/lib/lxc/100120/config" at line "lxc.kmsg = 1"
Failed to load config for 100120
lxc-console: 100120: tools/lxc_console.c: main: 103 System error loading container
 
Last edited: