Error setting cgroup cpu:lxc/xxx limit type cpu.cfs_period_us

nightcore

Renowned Member
Dec 2, 2015
6
1
68
Hello,
I have a fresh installed Debian 8 Jessie System with proxmox but my LXC container wouldnt start.
The first problem was the following:

Code:
lxc-start 1449035413.302 ERROR    lxc_cgmanager - cgmanager.c:cgm_setup_limits:1386 - call to cgmanager_set_value_sync failed: invalid request      lxc-start 1449035413.302 ERROR    lxc_cgmanager - cgmanager.c:cgm_setup_limits:1389 - Error setting cgroup memory:lxc/100 limit type memory.memsw.limit_in_bytes
      lxc-start 1449035413.302 ERROR    lxc_start - start.c:lxc_spawn:1029 - failed to setup the cgroup limits for '100'
      lxc-start 1449035413.313 ERROR    lxc_start - start.c:__lxc_start:1211 - failed to spawn '100'
      lxc-start 1449035418.546 ERROR    lxc_start_ui - lxc_start.c:main:344 - The container failed to start.
      lxc-start 1449035418.546 ERROR    lxc_start_ui - lxc_start.c:main:346 - To get more details, run the container in foreground mode.
      lxc-start 1449035418.546 ERROR    lxc_start_ui - lxc_start.c:main:348 - Additional information can be obtained by setting the --logfile and --logpriority options.

But i fixed it by adding "swapaccount=1" to the GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub.
Now i getting this error:
Code:
      lxc-start 1449072343.163 INFO     lxc_start_ui - lxc_start.c:main:264 - using rcfile /var/lib/lxc/100/config      lxc-start 1449072343.163 WARN     lxc_confile - confile.c:config_pivotdir:1804 - lxc.pivotdir is ignored.  It will soon become an error.
      lxc-start 1449072343.164 WARN     lxc_cgmanager - cgmanager.c:cgm_get:993 - do_cgm_get exited with error
      lxc-start 1449072343.164 INFO     lxc_lsm - lsm/lsm.c:lsm_init:48 - LSM security driver nop
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:324 - processing: .reject_force_umount  # comment this to allow umount -f;  not recommended.
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:426 - Adding native rule for reject_force_umount action 0
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:do_resolve_add_rule:216 - Setting seccomp rule to reject force umounts


      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:429 - Adding compat rule for reject_force_umount action 0
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:do_resolve_add_rule:216 - Setting seccomp rule to reject force umounts


      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:324 - processing: .[all].
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:324 - processing: .kexec_load errno 1.
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:426 - Adding native rule for kexec_load action 327681
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:429 - Adding compat rule for kexec_load action 327681
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:324 - processing: .open_by_handle_at errno 1.
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:426 - Adding native rule for open_by_handle_at action 327681
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:429 - Adding compat rule for open_by_handle_at action 327681
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:324 - processing: .init_module errno 1.
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:426 - Adding native rule for init_module action 327681
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:429 - Adding compat rule for init_module action 327681
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:324 - processing: .finit_module errno 1.
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:426 - Adding native rule for finit_module action 327681
      lxc-start 1449072343.164 WARN     lxc_seccomp - seccomp.c:do_resolve_add_rule:233 - Seccomp: got negative # for syscall: finit_module
      lxc-start 1449072343.164 WARN     lxc_seccomp - seccomp.c:do_resolve_add_rule:234 - This syscall will NOT be blacklisted
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:429 - Adding compat rule for finit_module action 327681
      lxc-start 1449072343.164 WARN     lxc_seccomp - seccomp.c:do_resolve_add_rule:233 - Seccomp: got negative # for syscall: finit_module
      lxc-start 1449072343.164 WARN     lxc_seccomp - seccomp.c:do_resolve_add_rule:234 - This syscall will NOT be blacklisted
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:324 - processing: .delete_module errno 1.
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:426 - Adding native rule for delete_module action 327681
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:429 - Adding compat rule for delete_module action 327681
      lxc-start 1449072343.164 INFO     lxc_seccomp - seccomp.c:parse_config_v2:436 - Merging in the compat seccomp ctx into the main one
      lxc-start 1449072343.164 INFO     lxc_conf - conf.c:run_script_argv:362 - Executing script '/usr/share/lxc/hooks/lxc-pve-prestart-hook' for container '100', config section 'lxc'
      lxc-start 1449072343.749 DEBUG    lxc_start - start.c:setup_signal_fd:264 - sigchild handler set
      lxc-start 1449072343.750 DEBUG    lxc_console - console.c:lxc_console_peer_default:500 - opening /dev/tty for console peer
      lxc-start 1449072343.750 DEBUG    lxc_console - console.c:lxc_console_peer_default:506 - using '/dev/tty' as console
      lxc-start 1449072343.750 DEBUG    lxc_console - console.c:lxc_console_sigwinch_init:179 - 30604 got SIGWINCH fd 9
      lxc-start 1449072343.750 DEBUG    lxc_console - console.c:lxc_console_winsz:88 - set winsz dstfd:6 cols:80 rows:24
      lxc-start 1449072343.750 INFO     lxc_start - start.c:lxc_init:460 - '100' is initialized
      lxc-start 1449072343.750 DEBUG    lxc_start - start.c:__lxc_start:1184 - Not dropping cap_sys_boot or watching utmp
      lxc-start 1449072343.750 INFO     lxc_cgroup - cgroup.c:cgroup_init:65 - cgroup driver cgmanager initing for 100
      lxc-start 1449072343.754 DEBUG    lxc_cgmanager - cgmanager.c:cgm_setup_limits:1393 - cgroup 'memory.limit_in_bytes' set to '2147483648'
      lxc-start 1449072343.754 DEBUG    lxc_cgmanager - cgmanager.c:cgm_setup_limits:1393 - cgroup 'memory.memsw.limit_in_bytes' set to '4294967296'
      lxc-start 1449072343.754 ERROR    lxc_cgmanager - cgmanager.c:cgm_setup_limits:1386 - call to cgmanager_set_value_sync failed: invalid request
      lxc-start 1449072343.754 ERROR    lxc_cgmanager - cgmanager.c:cgm_setup_limits:1389 - Error setting cgroup cpu:lxc/100 limit type cpu.cfs_period_us
      lxc-start 1449072343.754 ERROR    lxc_start - start.c:lxc_spawn:1029 - failed to setup the cgroup limits for '100'
      lxc-start 1449072343.754 ERROR    lxc_start - start.c:__lxc_start:1211 - failed to spawn '100'
      lxc-start 1449072343.772 INFO     lxc_conf - conf.c:run_script_argv:362 - Executing script '/usr/share/lxc/hooks/lxc-pve-poststop-hook' for container '100', config section 'lxc'
      lxc-start 1449072344.404 ERROR    lxc_start_ui - lxc_start.c:main:344 - The container failed to start.
      lxc-start 1449072344.404 ERROR    lxc_start_ui - lxc_start.c:main:348 - Additional information can be obtained by setting the --logfile and --logpriority options.


Code:
orion1948:/var/log/lxc# pveversion -v
proxmox-ve: 4.0-22 (running kernel: 4.3.0)
pve-manager: 4.0-57 (running version: 4.0-57/cc7c2b53)
pve-kernel-4.2.3-2-pve: 4.2.3-22
lvm2: 2.02.116-pve1
corosync-pve: 2.3.5-1
libqb0: 0.17.2-1
pve-cluster: 4.0-24
qemu-server: 4.0-35
pve-firmware: 1.1-7
libpve-common-perl: 4.0-36
libpve-access-control: 4.0-9
libpve-storage-perl: 4.0-29
pve-libspice-server1: 0.12.5-2
vncterm: 1.2-1
pve-qemu-kvm: 2.4-12
pve-container: 1.0-21
pve-firewall: 2.0-13
pve-ha-manager: 1.0-13
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u1
lxc-pve: 1.1.4-3
lxcfs: 0.10-pve2
cgmanager: 0.39-pve1
criu: 1.6.0-1


/etc/pve/lxc/100.conf
Code:
arch: amd64cpulimit: 4
cpuunits: 1024
hostname: web
memory: 2048
ostype: debian
rootfs: local:100/vm-100-disk-1.raw,size=10G

swap: 2048


Any idea?


EDIT:
When i edit the
/var/lib/lxc/100/config file and delete the two lines "lxc.cgroup.cpu.cfs_period_us" and "lxc.cgroup.cpu.cfs_quota_us" the container is starting with lxc-start. Any idea?
 
Last edited:
Both cgmanager and lxcfs are running?

# systemctl status lxcfs.service
# systemctl status cgmanager.service
 
Problem solved.
I used a myself compiled 4.3 Kernel and forgot to switch to the pve kernel. my mistake :rolleyes:
Thanks
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!