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

Allow to set kernel on machine level #376

Closed

Conversation

avoidik
Copy link

@avoidik avoidik commented Oct 30, 2022

@avoidik
Copy link
Author

avoidik commented Oct 30, 2022

this will allow us to set custom kernel and initrd on machine level like this

$ debos --verbose --show-boot --debug-shell -k /boot/vmlinuz debos-recipe.yaml

cmd/debos/debos.go Outdated Show resolved Hide resolved
@avoidik avoidik force-pushed the feature/allow-to-override-kernel branch from 5da1ebf to 1151914 Compare October 30, 2022 19:02
@avoidik avoidik changed the title Allow to set kernel and initrd on machine level Allow to set kernel on machine level Oct 30, 2022
Copy link
Member

@obbardc obbardc left a comment

Choose a reason for hiding this comment

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

Looks like my review was pending and wasn't ever posted. Sorry about that.

@@ -49,37 +49,37 @@ func warnLocalhost(variable string, value string) {
Consider using an address that is valid on your network.`

if strings.Contains(value, "localhost") ||
strings.Contains(value, "127.0.0.1") ||
strings.Contains(value, "::1") {
strings.Contains(value, "127.0.0.1") ||
Copy link
Member

Choose a reason for hiding this comment

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

spurious go format changes shouldnt be included in this commit

CPUs int `short:"c" long:"cpus" description:"Number of CPUs to use for build VM (default: 2)"`
Memory string `short:"m" long:"memory" description:"Amount of memory for build VM (default: 2048MB)"`
ShowBoot bool `long:"show-boot" description:"Show boot/console messages from the fake machine"`
KernelPath string `short:"k" long:"kernel" description:"kernel to use"`
Copy link
Member

@obbardc obbardc Oct 31, 2022

Choose a reason for hiding this comment

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

I think we should make this option a little more dynamic, something like:

--fakemachine-backend-option kernel-path:kernel.img

if err = m.SetBackendOption("key", "value"); err != nil {
    // show error to user
}

@obbardc
Copy link
Member

obbardc commented Feb 20, 2024

closing in favour of go-debos/fakemachine#192

@obbardc obbardc closed this Feb 20, 2024
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