Interesting thanks, thats handy! I didn’t think you could start kernel modules from within systemd-nspawn or are you just suggesting to build them here then move them to the host?
Seems like it would take more steps to automate this compared to the dockerfile approach. Any reason I couldn’t re-stage this env as a docker container?
The docker build happens in an unprivileged container so can build anywhere that is version consistent with the target machine. When the container is run it just runs modprobe. This works great but for having a relatively large container just to install a kernel module, and me not knowing how to trigger the build process on a CoreOS upgrade event.
I suppose I could pre-build the module containers based on beta or alpha CoreOS versions, then just pull and run the appropriate container based on the CoreOS version on the production machines.
Also I like the idea of public dockerfiles, so we can find pre-rolled module installers and not duplicated a lot of low level 'busy work’.