diff options
| -rw-r--r-- | docs/freebsd/README.md | 16 | ||||
| -rw-r--r-- | vm/bhyve/bhyve.go | 2 |
2 files changed, 13 insertions, 5 deletions
diff --git a/docs/freebsd/README.md b/docs/freebsd/README.md index e8bf5d027..c16c32e76 100644 --- a/docs/freebsd/README.md +++ b/docs/freebsd/README.md @@ -117,12 +117,12 @@ If you plan to run the syscall executor as root, ensure that root SSH logins are ### Running Under bhyve -Some additional steps are required on the host in order to use bhyve. First, ensure that the host system is at r346550 or later. Second, since bhyve currently does not support disk image snapshots, ZFS must be used to provide equivalent functionality. Create a ZFS data set and copy the VM image there. The data set can also be used to store the syzkaller workdir. For example, with a zpool named `data` mounted at `/data`, write: +Some additional steps are required on the host in order to use bhyve. First, since bhyve currently does not support disk image snapshots, ZFS must be used to provide equivalent functionality. Create a ZFS data set and copy the VM image there. The data set can also be used to store the syzkaller workdir. For example, with a zpool named `data` mounted at `/data`, write: ```console # zfs create data/syzkaller -# cp FreeBSD-13.0-CURRENT-amd64.raw /data/syzkaller +# cp FreeBSD-13.3-CURRENT-amd64.raw /data/syzkaller ``` -Third, configure networking and DHCP for the VM instances: +Third, configure bridged networking and DHCP for the VM instances. This is no longer required on FreeBSD 14.1 and 15.0-CURRENT, as bhyve now supports libslirp-based user networking similar to the QEMU backend. ```console # ifconfig bridge create @@ -190,11 +190,19 @@ For bhyve, we need to specify the VM image snapshot name and networking info (al "type": "bhyve", "vm": { "count": 10, - "bridge": "bridge0", "hostip": "169.254.0.1", "dataset": "data/syzkaller" } ``` +If using bridged networking, the name of the bridge interface needs to be included in the "vm" block: +``` + "vm": { + "count": 10, + "hostip": "169.254.0.1", + "dataset": "data/syzkaller", + "bridge": "bridge0" + } +``` Then, start `syz-manager` with: ```console diff --git a/vm/bhyve/bhyve.go b/vm/bhyve/bhyve.go index 1570b7939..e645ca191 100644 --- a/vm/bhyve/bhyve.go +++ b/vm/bhyve/bhyve.go @@ -333,7 +333,7 @@ func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command strin } inst.merger.Add("ssh", rpipe) - sshargs := []string{} + var sshargs []string if inst.forwardPort != 0 { sshargs = vmimpl.SSHArgsForward(inst.debug, inst.sshkey, inst.port, inst.forwardPort, false) } else { |
