<p dir="ltr">i find the command from this document:</p>
<p dir="ltr"><a href="https://github.com/lxc/lxd/blob/master/specs/command-line-user-experience.md">https://github.com/lxc/lxd/blob/master/specs/command-line-user-experience.md</a></p>
<p dir="ltr">Document can be updated.<br>
</p>
<div class="gmail_quot<blockquote class=" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">0 ✓ serge@sl ~/go/bin $ lxc config set b2 limits.memory 4G<br>
0 ✓ serge@sl ~/go/bin $ lxc start b2<br>
0 ✓ serge@sl ~/go/bin $ lxc stop b2<br>
0 ✓ serge@sl ~/go/bin $ lxc config set b2 limits.memory 4GB<br>
0 ✓ serge@sl ~/go/bin $ lxc start b2<br>
error: starting the container failed<br>
<br>
So I'd call this a bug in lxc - maybe two - for not warning you at<br>
'config set' time about it being invalid, and for not accepting 4GB.<br>
<br>
Quoting Fırat KÜÇÜK (<a href="mailto:firatkucuk@gmail.com">firatkucuk@gmail.com</a>):<br>
> i tried:<br>
><br>
> lxc config set ilactakip limits.memory 4GB<br>
><br>
> lxc accepted the key but container doesn't start.<br>
><br>
> lxc_container 1430238697.214 INFO lxc_cgroup -<br>
> cgroup.c:cgroup_init:65 - cgroup driver cgmanager initing for ilactakip<br>
> lxc_container 1430238697.216 INFO lxc_monitor -<br>
> monitor.c:lxc_monitor_sock_name:177 - using monitor sock name<br>
> lxc/92ea7555d42fc75c//var/lib/lxd/lxc<br>
> lxc_container 1430238697.219 ERROR lxc_cgmanager -<br>
> cgmanager.c:cgm_setup_limits:1247 - call to cgmanager_set_value_sync<br>
> failed: invalid request<br>
> lxc_container 1430238697.219 ERROR lxc_cgmanager -<br>
> cgmanager.c:cgm_setup_limits:1250 - Error setting cgroup<br>
> memory:lxc/ilactakip limit type memory.limit_in_bytes<br>
> lxc_container 1430238697.219 ERROR lxc_start - start.c:lxc_spawn:984 -<br>
> failed to setup the cgroup limits for 'ilactakip'<br>
> lxc_container 1430238697.286 ERROR lxc_start -<br>
> start.c:__lxc_start:1164 - failed to spawn 'ilactakip'<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> 2015-04-28 19:25 GMT+03:00 Fırat KÜÇÜK <<a href="mailto:firatkucuk@gmail.com">firatkucuk@gmail.com</a>>:<br>
><br>
> > Hi,<br>
> ><br>
> > ı want to use lxd on my dedicated server to seperate my projects like kvm<br>
> > based VPSs.<br>
> ><br>
> > So i cannot find a complete document about lxd<br>
> ><br>
> > how can i limit memory of my lxd container?<br>
> ><br>
> > I tried something like this but cannot succeeded<br>
> ><br>
> > lxc config set ilactakip lxc.cgroup.memory.limit_in_bytes 53687091<br>
> ><br>
> ><br>
> > and how can i rename my container?<br>
> ><br>
> > regards.<br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > FIRAT KÜÇÜK<br>
> ><br>
><br>
><br>
><br>
> --<br>
> FIRAT KÜÇÜK<br>
<br>
> _______________________________________________<br>
> lxc-users mailing list<br>
> <a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
> <a href="http://lists.linuxcontainers.org/listinfo/lxc-users" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a><br>
<br>
_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a></div>