On Tue, Mar 7, 2017 at 10:43 PM, RayFerguson <subscri...@share-foo.com> wrote:
> I'm cheap, so I don't have great storage on my dev boxes and I have some > custom templates that I want in my images. My current process is something > like. > > lxc publish contain --alias=foo > lxc image export foo > .... > extract metadata, add templates, mod the metadata.yaml, create meta.tgz > and root.tgz > ... > lxc image import meta.tgz root.tgz > > You can see where this is painfully inefficient. Not only do I decompress > and recompress, lxd does the same thing and more several times causing more > I/O coffee breaks than my old bladder can handle. > > Is there any shortcut to just modify the metadata.yaml and templates of an > existing image without the export->decompress->monkey->recompress->import? > > I've been tempted to try monkeying the files directly in > /var/lib/lxd/images, but I'm not sure if that would corrupt it by changing > some integrity checksum or something? > Have you tried using zfs backend (or btrfs), and simpy use "lxc copy" (using a container as your 'template') instead of publish-launch? launch (image -> container) and copy (container -> container) should use zfs snapshot, with near-zero I/O load. publish (containter -> image) does not. -- Fajar
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users