Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add initrd option #84

Merged
merged 2 commits into from
Apr 22, 2022
Merged

add initrd option #84

merged 2 commits into from
Apr 22, 2022

Conversation

defhacks
Copy link
Contributor

Signed-off-by: Michael Coulter mjc@sekurity.org

This adds an option to specify an initrd for firecracker via --initrd-path.

Not sure if the default is what's preferred or if some tests need to be added, but this was enough to be useful my own use case.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Signed-off-by: Michael Coulter <mjc@sekurity.org>
@defhacks defhacks requested a review from a team as a code owner March 31, 2022 00:46
options.go Outdated
@@ -40,6 +40,7 @@ type options struct {
FcBinary string `long:"firecracker-binary" description:"Path to firecracker binary"`
FcKernelImage string `long:"kernel" description:"Path to the kernel image" default:"./vmlinux"`
FcKernelCmdLine string `long:"kernel-opts" description:"Kernel commandline" default:"ro console=ttyS0 noapic reboot=k panic=1 pci=off nomodules"`
FcInitrdPath string `long:"initrd-path" description:"path to initrd" default:"./initramfs"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 comments:

  1. Since this is optional, I don't think we should have a default.
  2. We don't suffix other options with path, I think the field name and arg name should just be FcInitrd and initrd respectively.
  3. Nitpick: capitalize the first letter of the description (i.e. "Path")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback, pushed up a fix for all 3 points.

Signed-off-by: Michael Coulter <mjc@sekurity.org>
Copy link
Contributor

@Kern-- Kern-- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Kern-- Kern-- merged commit 8ed4f5e into firecracker-microvm:master Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants