How to export container image as a unified tarball in LXD 5.21

Is it possible to export a container image as a unified tarball in LXD 5.21?
The lxc image export <name> command generates the split tarballs.

Thank you,
Leonid

No. Currently, only the split mode is supported, which produces a metadata tarball and a squashfs or qcow2 image for containers and virtual machines, respectively.

Hi there,

What @dinmusic said is correct for images downloaded from the simplestreams remotes (i.e those cached from remotes such as ubuntu: or images:).

However it is not correct for images published from LXD instances, e.g.

lxc init images:alpine/3.20 c1
lxc publish c1
Instance published with fingerprint: 9854419e7e66d13f406acdbf387a30dc5f0c97e092847a36e919aa3287cc95b2

lxc image export 9854419e7e66d13f406acdbf387a30dc5f0c97e092847a36e919aa3287cc95b2

ls 
-rw-rw-r--  1 user user 3902166 Oct  7 10:20 9854419e7e66d13f406acdbf387a30dc5f0c97e092847a36e919aa3287cc95b2.tar.gz

This exports a combined image tarball because LXD creates combined images when it publishes an instance.

We have an item for next cycle to support converting between image types during export.

1 Like

@tomp Thanks for pointing out the published instances, which are indeed exported as a unified/combined image tarball.

1 Like

Ok, thank you for clarification.

1 Like