Do we have “how it work” guide or document of images and meta ?
The mechanism of images and what meta data is, How to create your own ?
That’s too broad, Let me ask one specific question:
I’m docker and k8s user. But I never use any vanilia liunx container except ProxmoxVE
I follow this guide. I create image with debootstrap then start container with systemd-nspawn, So far so good.
First I download the debian rootfs images/debian/bookworm/amd64/default/20240927_05%3A24/rootfs.tar.xz then extract to a folder
Then try to start it with this command systemd-nspawn -D . --machine debian, I got an error "Failed to read machine ID from container image: Invalid argument"
Meanwhile, I found there is a script lxc-download.in. Then I found a file called meta looks like it’s the key. But after I extract it: What?! What even I’m looking at?
Let’s say I have a MyOS and need build a lxc image without any tools like lxc-create -t foo bar:
Fisrt I need collectt all files into rootfs and ship it
Second seems like I need write a meta pack for lxc/incus/nspawn? What step did I miss?
SO Question is: How meta data package works in lxc/incus/nspawn? Any doc?
Incus uses images that are prepared by a tool, distrobuilder. The preparation is somewhat minimal and I think you can easily get the gist of it. Distrobuilder requires a configuration file, and you can get a list of working configuration files at lxc-ci/images at main · lxc/lxc-ci · GitHub
This project (Linux Containers) generates often such updated images and makes them available for you at the images: remote in Incus. It is enabled by default in Incus. If you want to make yourself such images using distrobuilder, you need to use the appropriate parameters (depend on distribution). See Index of /images/ which has the logs of the generation of the images, and in each directory look for the build.log files that reveals the full command line you need to run.
That was the part about generating images, either for Incus or even LXC. Tip: to import in Incus, incus image import.
distrobuilder has a --debug flag that explains what it is doing and how to puts together the rootfs.
You mention meta and I am not sure what you mean here. If it is metadata of an image, then when you generate an image with distrobuilder, it will give you the metadata file of that image as a separate file. The other file is the rootfs.
Here we can help, if possible, with Incus, LXC and peripheral projects. systemd-nspawn is out of scope.
That’s intrduce more question: What is meta tarball and lxc/incus or lxc-download doing with it? Why I can’t extract just rootfs to run a container ( in low level )?