diff --git a/rc.d/vm b/rc.d/vm index caada6cf..b2a13dc4 100644 --- a/rc.d/vm +++ b/rc.d/vm @@ -3,8 +3,7 @@ # $FreeBSD$ # PROVIDE: vm -# REQUIRE: NETWORKING SERVERS dmesg -# BEFORE: dnsmasq ipfw pf +# REQUIRE: DAEMON vm_net # KEYWORD: shutdown nojail . /etc/rc.subr @@ -23,7 +22,6 @@ stop_cmd="${command} stopall -f" vm_start() { - env rc_force="$rc_force" ${command} init env rc_force="$rc_force" ${command} startall >/dev/null & } diff --git a/rc.d/vm_net b/rc.d/vm_net new file mode 100644 index 00000000..b3c69687 --- /dev/null +++ b/rc.d/vm_net @@ -0,0 +1,28 @@ +#!/bin/sh +# +# $FreeBSD$ + +# PROVIDE: vm_net +# REQUIRE: bridge +# BEFORE: dnsmasq ipfw pf +# KEYWORD: nojail + +. /etc/rc.subr + +: ${vm_enable="NO"} + +name=vm +desc="Start networking (bridges) for vm-bhyve guests on boot" +rcvar=vm_enable + +load_rc_config $name + +command="/usr/local/sbin/${name}" +start_cmd="${name}_start" + +vm_start() +{ + env rc_force="$rc_force" ${command} init +} + +run_rc_command "$1" diff --git a/vm.8 b/vm.8 index eaab2172..41f499c5 100644 --- a/vm.8 +++ b/vm.8 @@ -1304,6 +1304,15 @@ detected and used by setting this option to and .Pa diskX_name as described above. +.Pp +When +.Sy iscsi +disks are used with auto-start, set the following in +.Pa /etc/rc.conf +to prevent launching vms before iscsi connections are completed: +.Bd -literal -offset indent +iscsictl_flags="-Aa -w 60" +.Ed .It disk0_opts Any additional options to use for this disk device. Multiple options can be specified, separated by a comma.