{"action":"opened","issue":{"url":"https://api.github.com/repos/lxc/lxd/issues/1319","labels_url":"https://api.github.com/repos/lxc/lxd/issues/1319/labels{/name}","comments_url":"https://api.github.com/repos/lxc/lxd/issues/1319/comments","events_url":"https://api.github.com/repos/lxc/lxd/issues/1319/events","html_url":"https://github.com/lxc/lxd/issues/1319","id":117498017,"number":1319,"title":"Units mismatch for limits.memory","user":{"login":"erikmack","id":2968,"avatar_url":"https://avatars.githubusercontent.com/u/2968?v=3","gravatar_id":"","url":"https://api.github.com/users/erikmack","html_url":"https://github.com/erikmack","followers_url":"https://api.github.com/users/erikmack/followers","following_url":"https://api.github.com/users/erikmack/following{/other_user}","gists_url":"https://api.github.com/users/erikmack/gists{/gist_id}","starred_url":"https://api.github.com/users/erikmack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikmack/subscriptions","organizations_url":"https://api.github.com/users/erikmack/orgs","repos_url":"https://api.github.com/users/erikmack/repos","events_url":"https://api.github.com/users/erikmack/events{/privacy}","received_events_url":"https://api.github.com/users/erikmack/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-18T02:36:12Z","updated_at":"2015-11-18T02:36:12Z","closed_at":null,"body":"1. Note specs/configuration.md\r\n    > limits.memory ... Size in MB of the memory allocation for the container\r\n\r\n1. Limit container memory to 512MB\r\n    `lxc config set genttmp limits.memory 512`\r\n1. `lxc start genttmp` ... failure\r\n1. `lxc info --show-log genttmp`\r\n\r\n    > lxc 1447813188.958 DEBUG    lxc_cgmanager - cgmanager.c:cgm_setup_limits:1393 - cgroup 'memory.limit_in_bytes' set to '512'\r\n1. `lxc config set genttmp limits.memory $((1024*1024*512))`\r\n1. `lxc start genttmp` ... success!  And `free -m` in the container (with lxcfs) shows ~512M\r\n\r\nSo, either change MB to bytes in the doc, or convert in the code :-D\r\n"}}