<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Jan 29, 2017 at 4:04 AM, Frans Meulenbroeks <span dir="ltr"><<a href="mailto:fransmeulenbroeks@gmail.com" target="_blank">fransmeulenbroeks@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I'm working on migrating from LXC 1.x to LXC 2.</div><div>While doing so I bumped upon the following issue:</div><div><br></div><div>My containers are short-lived (say an hour or so).</div><div>In LXC 1 we used an overlay filesystem in order to speed up the lxc create.</div><div>However I understood LXC 2 does not have this capability.</div><div></div></div></blockquote><div><br></div><div><br></div><div>Where did you read that?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Any idea how to create containers quickly and efficiently in LXC 2<br><br></div><div>Complication is that at some times we have a fair amount of containers alive (say around 50), so creating all containers and reverting to a snapshot is probably not efficient </div></div></blockquote><div><br></div><div>Why is it not efficient?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>(apart from the space taken up by the 50 rootfs-es).</div><div><br></div><div>Thanks in advance for any suggestions how to tacke this!</div><span class="gmail-HOEnZb"><font color="#888888"><div></div></font></span></div></blockquote><div><br></div><div><br></div><div>I'm pretty sure you can still use overlayfs with lxc-2.</div><div><br></div><div>My suggestion though, is go with lxd and zfs instead. You can have a "golden" container, keep it stopped, and simply create your other containers with "lxc copy". With zfs, the "copy" process will be instaneus, and the "clone" will be its own filesystem (no lower/base directory restriction like in aufs/overlayfs).</div><div><br></div><div>If you need to modify the "golden" container (which will affect all NEW containers copied from it), simply start it and perform-your-changes like on a normal container (don't forget to stop it afterwards). Note that this is different from aufs/overlayfs, where generally you shouldn't touch the lower/base directory.</div><div><br></div><div>-- </div><div>Fajar</div></div></div></div>