@@ -28,12 +28,13 @@ func init() {
28
28
}
29
29
30
30
type Config struct {
31
- Bridge string `json:"bridge"` // name of network bridge device, optional
32
- Count int `json:"count"` // number of VMs to use
33
- CPU int `json:"cpu"` // number of VM vCPU
34
- HostIP string `json:"hostip"` // VM host IP address
35
- Mem string `json:"mem"` // amount of VM memory
36
- Dataset string `json:"dataset"` // ZFS dataset containing VM image
31
+ Bridge string `json:"bridge"` // name of network bridge device, optional
32
+ Count int `json:"count"` // number of VMs to use
33
+ CPU int `json:"cpu"` // number of VM vCPU
34
+ HostIP string `json:"hostip"` // VM host IP address
35
+ Mem string `json:"mem"` // amount of VM memory
36
+ Dataset string `json:"dataset"` // ZFS dataset containing VM image
37
+ BhyveArgs string `json:"bhyve_args"` // extra arguments to bhyve
37
38
}
38
39
39
40
type Pool struct {
@@ -185,9 +186,11 @@ func (inst *instance) Boot() error {
185
186
"-s" , fmt .Sprintf ("2:0,virtio-net,%v" , netdev ),
186
187
"-s" , fmt .Sprintf ("3:0,virtio-blk,%v" , inst .image ),
187
188
"-l" , "com1,stdio" ,
188
- inst .vmName ,
189
189
}
190
190
191
+ bhyveArgs = append (bhyveArgs , strings .Split (inst .cfg .BhyveArgs , " " )... )
192
+ bhyveArgs = append (bhyveArgs , inst .vmName )
193
+
191
194
outr , outw , err := osutil .LongPipe ()
192
195
if err != nil {
193
196
return err
0 commit comments