# lxc start test-centos-6
error: Error calling 'lxd forkstart test-centos-6 /var/lib/lxd/containers /var/log/lxd/test-centos-6/lxc.conf': err='exit status 1'
Try `lxc info --show-log test-centos-6` for more info
Check the logs
# lxc info --show-log test-centos-6 | egrep "ERROR"
lxc 1447352472.614 ERROR lxc_utils - utils.c:setproctitle:1461 - Invalid argument - setting cmdline failed
lxc 1447352472.675 ERROR lxc_sync - sync.c:__sync_wake:62 - sync wake failure : Broken pipe
lxc 1447352472.675 ERROR lxc_start - start.c:__lxc_start:1192 - failed to spawn 'test-centos-6'
Basically, i had set the max memory for the container to 4GB.
with
lxc config set test-centos-6 limits.memory 4096Only thing it is in bytes not MB
This fixes it.
lxc config set test-centos-6 limits.memory 4096000000Check the container once started
# lxc start test-centos-6
# lxc exec test-centos-6 /bin/bash
[root@test-centos-6 ~]# free -g
total used free shared buffers cached
Mem: 3 0 3 0 0 0
-/+ buffers/cache: 0 3
Swap: 7 0 7