Replies: 2 comments 3 replies
-
I am not sure if I get the question completely, but that might be because I don't know too much about LXC. I'll make the reply longer to reasonably cover what I think is relevant - sorry if you have to pick the right bits from it. First, just straight answers to the questions...
Anaconda must start, have a complete kickstart, and a viable installation target.
I think
You need to run the installation in dirinstall mode. This is a bit tricky, as there are few references to it, because there is no documentation; check here for the tiny bits of info: https://github.com/rhinstaller/anaconda/blob/master/data/anaconda_options.txt Essentially you start anaconda with the Second, the more open ended part. I am not clear on how you plan to to install "into" a container. Can you somehow import an archive, image, or something to create the LXC container? That's how Fedora does it. They use anaconda with kickstart to create the base image. There was an excellent article on the Fedora blog some time ago that describes some of that: https://fedoramagazine.org/how-to-build-fedora-container-images/ The article mostly leaves out the crucial part "where does the archive come from": There's only a vague description and a dead link to Koji, but you could probably swap in a newer compose date into the url and it should work. Anyway, connecting with the [Fedora infra?] people doing that left-out part might help you far more than I can. There's also https://fedoramagazine.org/build-smaller-containers/ where the "Building containers from scratch" part might be relevant. Finally, just to make you aware, beside dirinstall, there is also image installation. I never had to care about either, so I can't tell you which is the correct one you will need for your project. |
Beta Was this translation helpful? Give feedback.
-
I too share the same requirements as previously stated and I've been both searching around while also doing a touch of reverse engineering to see how the current images are built and uploaded. The current process uses higher level tools therefore a greater set of dependencies and thus complexity to implement, using anaconda at a lower level offers a few advantages.
My thoughts on these points during the interim as a POC would effectively be nesting another call to anaconda within the %post section calling those very commands and using an include file containing the lxc based ks profile. Image installation can follow once proven that this works. Also a new package group could be used/created such as "@lxc" much like "@minimal" granted lxc/zones require less package as on the host OS to function. On a test box in the meantime... Syntax is correct, slight change: ** (process:678): WARNING **: 10:29:26.418: failed to load module btrfs: libbd_btrfs.so.2: cannot open shared object file: No such file or directory ** (process:678): WARNING **: 10:29:26.418: failed to load module swap: libbd_swap.so.2: cannot open shared object file: No such file or directory ** (process:678): WARNING **: 10:29:26.419: failed to load module loop: libbd_loop.so.2: cannot open shared object file: No such file or directory ** (process:678): WARNING **: 10:29:26.419: failed to load module crypto: libbd_crypto.so.2: cannot open shared object file: No such file or directory ** (process:678): WARNING **: 10:29:26.419: failed to load module mpath: libbd_mpath.so.2: cannot open shared object file: No such file or directory ** (process:678): WARNING **: 10:29:26.419: failed to load module dm: libbd_dm.so.2: cannot open shared object file: No such file or directory ** (process:678): WARNING **: 10:29:26.419: failed to load module mdraid: libbd_mdraid.so.2: cannot open shared object file: No such file or directory ** (process:678): WARNING **: 10:29:26.419: failed to load module nvdimm: libbd_nvdimm.so.2: cannot open shared object file: No such file or directory This does work however upon starting the lxc/zone once install finishes/exits I see this:
Looks like 3 interacting parts between systemd, lxc and anaconda. ` [root@te lxc]# rpm -qa systemd* [root@te lxc]# rpm -qa anaconda* [root@te lxc]# rpm -qa lxc* |
Beta Was this translation helpful? Give feedback.
-
I'm trying to find a way how to use kickkstart to install LXC zone.
To be able use kickstart file to install LC zone it is necessary to answer on below questions:
I would be appreciated if someone will be able to find answers o above questions and/or provide any suggestions how to approach to use anaconda on implementing LXC zone install.
Beta Was this translation helpful? Give feedback.
All reactions