Skip to content

Commit

Permalink
Merge 7455a11 into 3217c47
Browse files Browse the repository at this point in the history
  • Loading branch information
yitsushi authored Oct 27, 2021
2 parents 3217c47 + 7455a11 commit 382368a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions infrastructure/firecracker/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,21 @@ func ApplyConfig(ctx context.Context, cfg *VmmConfig, client *firecracker.Client
return fmt.Errorf("putting %s network configuration: %w", guestIfaceName, err)
}
}

bootArgs := ""
if cfg.BootSource.BootArgs != nil {
bootArgs = *cfg.BootSource.BootArgs
}

initrdPath := ""
if cfg.BootSource.InitrdPath != nil {
initrdPath = *cfg.BootSource.InitrdPath
}

_, err = client.PutGuestBootSource(ctx, &fcmodels.BootSource{
KernelImagePath: &cfg.BootSource.KernelImagePage,
BootArgs: *cfg.BootSource.BootArgs,
InitrdPath: *cfg.BootSource.InitrdPath,
BootArgs: bootArgs,
InitrdPath: initrdPath,
})
if err != nil {
return fmt.Errorf("failed to put machine bootsource: %w", err)
Expand Down

0 comments on commit 382368a

Please sign in to comment.