From b27a308aa35294d549e33cde81daab10a3cd47a6 Mon Sep 17 00:00:00 2001 From: Charalampos Mainas Date: Mon, 18 May 2026 19:20:14 +0000 Subject: [PATCH] Choose the Linux kernel based on the chosen monitor If the user specifies a specific monitor for the contianer (e.g. Firecracker), then bunny should inlcude the respective kernel image for that monitor. Signed-off-by: Charalampos Mainas --- hops/parse_file.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hops/parse_file.go b/hops/parse_file.go index 24ee51f..c2bb280 100644 --- a/hops/parse_file.go +++ b/hops/parse_file.go @@ -28,9 +28,10 @@ import ( ) const ( - defaultUrunitImage string = "harbor.nbfc.io/nubificus/urunit:latest" - defaultUrunitPath string = "/urunit" - defaultKernelImage string = "harbor.nbfc.io/nubificus/urunc/linux-kernel-qemu:latest" + defaultUrunitImage string = "harbor.nbfc.io/nubificus/urunit:latest" + defaultUrunitPath string = "/urunit" + defaultQemuKernelImage string = "harbor.nbfc.io/nubificus/bunny/linux-kernel-qemu:latest" + defaultFirecrackerKernelImage string = "harbor.nbfc.io/nubificus/bunny/linux-kernel-firecracker:latest" ) var ( @@ -195,7 +196,11 @@ func containerfileToPack(state *llb.State, img *dockerspec.DockerOCIImage) (*Pac if instr.Annots["com.urunc.unikernel.binary"] == "" { var aCopy PackCopies - aCopy.SrcState = llb.Image(defaultKernelImage) + if instr.Annots["com.urunc.unikernel.hypervisor"] == "qemu" { + aCopy.SrcState = llb.Image(defaultQemuKernelImage) + } else { + aCopy.SrcState = llb.Image(defaultFirecrackerKernelImage) + } aCopy.SrcPath = DefaultKernelPath aCopy.DstPath = DefaultKernelPath instr.Copies = append(instr.Copies, aCopy)