On 2021/09/23 Thu 15:59, Srinidhi B wrote:
On Thu, 2021-09-23 at 23:42 +0800, Kai Liu wrote:
Thanks. My original question was related. Here in this file the kernel and initrd can be appointed. But it's a machine-wide option, means every worker VM on this machines will use the same kernel & initrd to boot. Thus you will end up building a CentOS package with SLES kernel, for example. This is what I would like to solve, by following how it's done on boo.
Correct. If you want to set different kernel and initrd per build, then you need to follow what Andreas recommended - check what boot-vm-kvm does.
By following that script, I recently managed to configure a worker to build CentOS packages on SLES nodes:
* Install kernel-obs-build on the worker node * sudo ln -s /.build.kernel.kvm /boot/kernel.obs.guest * sudo ln -s /.build.initrd.kvm /boot/initrd.obs.guest
I don't know if this is the correct way of doing things or not, but this is currently working in one of our private OBS instances.
The key is the VM worker needs to find its kernel & initrd _per build job_, so that it can use the right kernel for the right distro the job build against. Thus the kernel and initrd cannot be fixed in /etc/sysconfig/obs-server, nor can they be pointed to some file on the host. Regards, Kai