[kata-dev] Dracut initramfs for distro packaging
mvedovati at suse.com
Wed Jun 12 17:06:16 UTC 2019
On 5/7/19 10:38 PM, Jose Carlos Venegas Munoz wrote:
> So I think would need more feedback from all the community and also
> from linux distributions in general so we can have a solution that
> works better for all.
Hi Jose Carlos, Stefan,
I am providing a follow-up, since I also faced packaging problems trying
to provide Kata image and kernel packages in openSUSE:
- w.r.t. kernel: providing a "third party" kernel package along with the
official distro kernels is something not usually possible for various
reasons, such as the need to maintain a strict control over how the
kernels are built/patched/maintained.
- w.r.t. image: lack of standardized/simple ways of generating a image
and to provide it inside a package.
I've evaluated the use of dracut generated initramfs starting from
Stefan PoC, and in the few tests I did it seems a viable solution,
keeping in mind that at the moment the main use case would be to provide
something that is packaging friendly.
With respect to the distro kernels compatibility, the goal would be to
reuse a vanilla or a generic kvm kernel that is already provided by the
distribution, and have dracut load in the initramfs the kernel modules
required by Kata.
> Here some question related with dracut usage:
> 1. Is it possible to build a disk image?
You can build a disk image with DAX using as base the rootfs included
in the initramfs.
> 2. Is it possible to have a custom rootfs with packages I want?
> Today we require system + agent + iptables + chrony. But also
> we support not having system but the agent as init. Also, users
> may want to add additional binaries in the future (to be part of the
> official image or just for hacking).
Support for agent + iptables + chrony is something that could be
provided with a custom dracut modules, or using the dracut overlay (as
I have spent some time polishing the tests I did, and I've submitted a
"RFC" PR to osbuilder to add support for dracut-based initrd / images:
Hopefully this is a good starting point.
More information about the kata-dev