Best practice create/share simplestreams from lxd image export

Instead of creating new images from scratch using debootstrap I’m looking for a way to share lxc snapshot exports on a nginx server using simplestreams (e.g. using Avature/lxd-image-server).

Does anybody have a best practice how to automate publishing simplestreams from lxd images? I played around with tar2sqfs from squashfs-tools-ng but didn’t get it running to repackage the unified tarball from lxd export into a split tarball to be stored on a web server.

It would be great if lxd could alternativly create an image export to be used as a simplestream image - or do I miss something and this should already work somehow?

Yeah, we’ve considered adding support for publishing to split images for a while but it’s never really made it to the top of the list of features to implement :slight_smile:

Scripting the repacking process should be reasonably straightforward though:

  • tar xvf unified.tar.gz
  • mksquashfs rootfs/ rootfs.squashfs -noappend -comp xz -b 1M
  • tar Jcf metadata.tar.xz metadata.yaml templates/

You’ll then get your metadata.tar.xz and rootfs.squashfs for a normal split image.