unikraft / kraftkit

Build and use highly customized and ultra-lightweight unikernel VMs.
https://unikraft.org/docs/cli
BSD 3-Clause "New" or "Revised" License
240 stars 64 forks source link

Allow setting output path of unikernel in `kraft build` #705

Open nderjung opened 1 year ago

nderjung commented 1 year ago

Feature request summary

This issue tracks introducing a new flag -k|--kernel which is used to save the binary image of a unikernel following a successful build. Not only does this empower the user to use the binary as they wish without hiding it away within the .unikraft build folder, but it is useful immediately in the context of #703 which requires knowledge of the the path of the binary.

Following the introduction of https://github.com/unikraft/unikraft/pull/1169 this should now be possible in conjunction with Unikraft's build system too. The basename of the kernel should be set to the KConfig variable in the aforementioned PR.

Adjust unikraft/target/target.go to have a new interface method introduced SetKernelPath(string) which a). updates the internal kernel attribute and b). sets the relevant KConfig option mentioned in the aforementioned PR.

Since Unikraft's build system does not support an individual path for a kernel (because it concatenates the output with the kernel file name), this adjustment should simply perform a mv of the file to the desired location following a successful build.

Describe alternatives

No response

Related architectures

None

Related platforms

None

Additional context

This issue was adjusted to change the flag from -o|--output to -k|--kernel as the output could be instead used to place the .unikraft/build folder instead (a separate issue will track this).

allenkting commented 7 months ago

Hello! I am a Computer Science student at the University of Texas at Austin. I am currently taking virtualization (CS 360v), and my partner and I would like contribute to this project. We would be interested in being assigned to work on this issue if it is still open!

nderjung commented 7 months ago

Hi @allenkting, sure no problem. I've also updated the issue with more information.

melars74 commented 6 months ago

Hi @nderjung, I'm Allen's partner for this project. I'm a little confused as to what the key should be when setting the relevant kconfig option. Could you clarify this?