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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
FcInitrd string `long:"initrd-path" description:"Path to initrd"`
FcRootDrivePath string `long:"root-drive" description:"Path to root disk image"`
FcRootPartUUID string `long:"root-partition" description:"Root partition UUID"`
FcAdditionalDrives []string `long:"add-drive" description:"Path to additional drive, suffixed with :ro or :rw, can be specified multiple times"`
Expand Down Expand Up @@ -146,6 +147,7 @@ func (opts *options) getFirecrackerConfig() (firecracker.Config, error) {
FifoLogWriter: fifo,
KernelImagePath: opts.FcKernelImage,
KernelArgs: opts.FcKernelCmdLine,
InitrdPath: opts.FcInitrd,
Drives: blockDevices,
NetworkInterfaces: NICs,
VsockDevices: vsocks,
Expand Down