0

container name: vm1

config:

lxc.tty = 4                                                                                                                                                                            
lxc.pts = 1024                                                                  
lxc.rootfs = /var/lib/lxc/vm1/rootfs                                          
lxc.mount.entry = sysfs /var/lib/lxc/vm1/rootfs/sys sysfs defaults  0 0          
lxc.network.type = veth                                                         
lxc.network.flags = up                                                          
lxc.network.link = br0                                                          
lxc.network.veth.pair = veth_vm1                                              
lxc.cgroup.memory.limit_in_bytes = 512M                                         
lxc.cgroup.memory.memsw.limit_in_bytes = 1G                                     


lxc.utsname = vm1                                                             

lxc.cgroup.devices.deny = a                                                     
lxc.cgroup.devices.allow = c 1:3 rwm                                            
lxc.cgroup.devices.allow = c 1:5 rwm                                            
lxc.cgroup.devices.allow = c 5:1 rwm                                            
lxc.cgroup.devices.allow = c 5:0 rwm                                            
lxc.cgroup.devices.allow = c 4:0 rwm                                            
lxc.cgroup.devices.allow = c 4:1 rwm                                            
lxc.cgroup.devices.allow = c 1:9 rwm                                            
lxc.cgroup.devices.allow = c 1:8 rwm                                            
lxc.cgroup.devices.allow = c 136:* rwm                                          
lxc.cgroup.devices.allow = c 5:2 rwm                                            
lxc.cgroup.devices.allow = c 254:0 rwm                                          
lxc.cgroup.devices.allow = c 10:200 rwm 

I get the following error when I start the container? Could it be the memory setting?

$ lxc-start -n vm1

// error
lxc-start: cgroup is not mounted
lxc-start: failed to setup the cgroups for 'vm1'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn 'vm1'
ewwhite
  • 197,159
  • 92
  • 443
  • 809
Yaşar içli
  • 101
  • 3

1 Answers1

0

You need to have the cgroup filesystem mounted. If this is RHEL/CentOS, make sure you have libcgroup installed.

ewwhite
  • 197,159
  • 92
  • 443
  • 809