Skip to content

vm/bhyve: added customizable bhyve arguments #5941

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

brendabrandy
Copy link

When using syzkaller on freebsd, i found myself needing to add extra arguments to the bhyve invocation.

Since QEMU has a similar qemu_args option, I created an equivalent bhyve_args option.

dvyukov
dvyukov previously approved these changes Apr 15, 2025
@dvyukov
Copy link
Collaborator

dvyukov commented Apr 15, 2025

Seems reasonable. Thanks.
Waiting for CI to pass.

@dvyukov
Copy link
Collaborator

dvyukov commented Apr 15, 2025

CI complains about commit message and code formatting, these need to be fixed before we can merge:

Error: Wrong commit subject format: '[vm/bhyve]: added customizable bhyve arguments'. Please use 'main/affected/package: short change description'. See docs/contributing.md for details. Regex pattern used to check commit subjects is '^(Revert "|(([a-z0-9/_.-]+|Makefile|CONTRIBUTORS|README.md)(, )?)+:\ [^A-Z].+[^.]$)'.
./tools/check-language.sh
1 commits checked for format style (git log -n 1 17efcc2715044770b30cefd58fb18155776faef7)
diff --git a/vm/bhyve/bhyve.go b/vm/bhyve/bhyve.go
index 30c2b76..76a74c6 100644
--- a/vm/bhyve/bhyve.go
+++ b/vm/bhyve/bhyve.go
@@ -28,13 +28,13 @@ func init() {
 }
 
 type Config struct {
-	Bridge      string `json:"bridge"`      // name of network bridge device, optional
-	Count       int    `json:"count"`       // number of VMs to use
-	CPU         int    `json:"cpu"`         // number of VM vCPU
-	HostIP      string `json:"hostip"`      // VM host IP address
-	Mem         string `json:"mem"`         // amount of VM memory
-	Dataset     string `json:"dataset"`     // ZFS dataset containing VM image
-	BhyveArgs   string `json:"bhyve_args"`	// extra arguments to bhyve
+	Bridge    string `json:"bridge"`     // name of network bridge device, optional
+	Count     int    `json:"count"`      // number of VMs to use
+	CPU       int    `json:"cpu"`        // number of VM vCPU
+	HostIP    string `json:"hostip"`     // VM host IP address
+	Mem       string `json:"mem"`        // amount of VM memory
+	Dataset   string `json:"dataset"`    // ZFS dataset containing VM image
+	BhyveArgs string `json:"bhyve_args"` // extra arguments to bhyve
 }
 
 type Pool struct {
vm/bhyve/bhyve.go:1:1: The file is not formatted/regenerated. Run 'make generate' and include it into the commit.
Error: The file is not formatted/regenerated. Run 'make generate' and include it into the commit.
1269 files checked for copyright statement

Added extra config argument "bhyve_args" to allow users
to add their own bhyve related arguments
@brendabrandy
Copy link
Author

Fixed my PR . Can we restart the workflow?

@brendabrandy brendabrandy changed the title [vm/bhyve]: added customizable bhyve arguments vm/bhyve: added customizable bhyve arguments Apr 18, 2025
@dvyukov dvyukov enabled auto-merge April 22, 2025 06:30
@a-nogikh
Copy link
Collaborator

@brendabrandy please drop the Merge branch 'google:master' into master - we rebase instead of merging.

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.

3 participants