I have started finding myself more comfortable with LXD than docker. Earlier, I was able to convert any iso file to docker image by following commands:
(1)sudo apt install squashfs-tools
(2) mkdir rootfs unquashfs
(3) sudo mount -o loop ubuntu-18.04.4-live-server-amd64.iso rootfs
(4) find . -type f | grep filesystem.squashfs
(5) sudo unsquashfs -f -d unsquashfs/ rootfs/casper/filesystem.squashfs
(6) sudo tar -C unsquashfs -c . | docker import - root/ubuntuserver1804
Now I have ubuntuserver1804 as docker image. But I want to import it as lxd image in point no. 6
Tried number of syntax but failed.
I know ,
(1) cant create lxd image from file with .tar extension. Requires .tar.gz extension.
(2) Distrobuilder : https://distrobuilder.readthedocs.io/en/latest/
I was trying to have lxd image of coreOS as an experiment.
I find this method more easy to create image. When we can create a docker image from squashfs-tools then we should also able to create lxd image.
I am still new to world of linux.