Why doesn’t sysutils/vm-bhyve start my hosts?

After booting, my vms are not started by sysutils/vm-bhyve. Why?

Here is me starting them today up after booting the host yesterday. NOTE: I already have a not to myself to add VM monitoring to Nagios.

[pro03 dan ~] % slocum
Last login: Tue Jan 17 14:52:12 2023 from pro03.startpoint.vpn.example.org
[slocum dan ~] % sudo vm list
NAME            DATASTORE  LOADER     CPU  MEMORY  VNC  AUTO  STATE
hass            default    uefi       4    4GB     -    No    Stopped
home-assistant  default    uefi       1    1GB     -    No    Stopped
myguest         default    bhyveload  1    768M    -    No    Stopped
[slocum dan ~] % sudo vm start hass
Starting hass
  * found guest in /usr/local/vm/hass
  * booting...
[slocum dan ~] % 

In this post

In this post I’m using:

  • FreeBSD 13.1-RELEASE-p3
  • vm-bhyve-1.5.0
  • edk2-bhyve-g202202_1

Let’s look at rcorder

Here is a shortened version of the rcorder output:

[slocum dan ~] % rcorder /etc/rc.d/* /usr/local/etc/rc.d/* | head -30                                                                                                             16:47:30
rcorder: file `/usr/local/etc/rc.d/vm' is before unknown provision `dnsmasq'
rcorder: Circular dependency on file `/usr/local/etc/rc.d/vm'.
rcorder: Circular dependency on provision `dmesg': /etc/rc.d/dmesg -> /etc/rc.d/mountcritremote -> /etc/rc.d/gssd -> /etc/rc.d/kdc -> /etc/rc.d/NETWORKING -> /etc/rc.d/local_unbound -> /etc/rc.d/netwait -> /etc/rc.d/pf -> /usr/local/etc/rc.d/vm -> /etc/rc.d/dmesg.
rcorder: Circular dependency on provision `mountcritremote': /etc/rc.d/mountcritremote -> /etc/rc.d/gssd -> /etc/rc.d/kdc -> /etc/rc.d/NETWORKING -> /etc/rc.d/local_unbound -> /etc/rc.d/netwait -> /etc/rc.d/pf -> /usr/local/etc/rc.d/vm -> /etc/rc.d/SERVERS -> /etc/rc.d/devfs -> /etc/rc.d/mountcritremote.
rcorder: `/etc/rc.d/devfs' was seen in circular dependencies for 1 times.
rcorder: Circular dependency on file `/etc/rc.d/kdc'.
rcorder: Circular dependency on provision `NETWORKING': /etc/rc.d/NETWORKING -> /etc/rc.d/local_unbound -> /etc/rc.d/netwait -> /etc/rc.d/pf -> /usr/local/etc/rc.d/vm -> /etc/rc.d/SERVERS -> /etc/rc.d/kdc -> /etc/rc.d/NETWORKING.
rcorder: `/etc/rc.d/kdc' was seen in circular dependencies for 3 times.
rcorder: Circular dependency on provision `mountcritremote': /etc/rc.d/mountcritremote -> /etc/rc.d/gssd -> /etc/rc.d/kdc -> /etc/rc.d/NETWORKING -> /etc/rc.d/local_unbound -> /etc/rc.d/netwait -> /etc/rc.d/pf -> /usr/local/etc/rc.d/vm -> /etc/rc.d/SERVERS -> /etc/rc.d/mdconfig2 -> /etc/rc.d/mountcritremote.
rcorder: `/etc/rc.d/mdconfig2' was seen in circular dependencies for 1 times.
rcorder: Circular dependency on provision `mountcritremote': /etc/rc.d/mountcritremote -> /etc/rc.d/gssd -> /etc/rc.d/kdc -> /etc/rc.d/NETWORKING -> /etc/rc.d/local_unbound -> /etc/rc.d/netwait -> /etc/rc.d/pf -> /usr/local/etc/rc.d/vm -> /etc/rc.d/SERVERS -> /etc/rc.d/syslogd -> /etc/rc.d/newsyslog -> /etc/rc.d/mountcritremote.
rcorder: `/etc/rc.d/newsyslog' was seen in circular dependencies for 1 times.
rcorder: Circular dependency on provision `mountcritremote': /etc/rc.d/mountcritremote -> /etc/rc.d/gssd -> /etc/rc.d/kdc -> /etc/rc.d/NETWORKING -> /etc/rc.d/local_unbound -> /etc/rc.d/netwait -> /etc/rc.d/pf -> /usr/local/etc/rc.d/vm -> /etc/rc.d/SERVERS -> /etc/rc.d/syslogd -> /etc/rc.d/mountcritremote.
rcorder: `/etc/rc.d/syslogd' was seen in circular dependencies for 2 times.
rcorder: Circular dependency on provision `NETWORKING': /etc/rc.d/NETWORKING -> /etc/rc.d/local_unbound -> /etc/rc.d/netwait -> /etc/rc.d/pf -> /usr/local/etc/rc.d/vm -> /etc/rc.d/SERVERS -> /usr/local/etc/rc.d/named -> /etc/rc.d/NETWORKING.
rcorder: `/usr/local/etc/rc.d/named' was seen in circular dependencies for 1 times.
rcorder: Circular dependency on provision `mountcritremote': /etc/rc.d/mountcritremote -> /etc/rc.d/gssd -> /etc/rc.d/kdc -> /etc/rc.d/NETWORKING -> /etc/rc.d/local_unbound -> /etc/rc.d/netwait -> /etc/rc.d/pf -> /usr/local/etc/rc.d/vm -> /etc/rc.d/SERVERS -> /etc/rc.d/linux -> /etc/rc.d/archdep -> /etc/rc.d/mountcritremote.
rcorder: `/etc/rc.d/archdep' was seen in circular dependencies for 1 times.
rcorder: `/etc/rc.d/linux' was seen in circular dependencies for 1 times.
rcorder: Circular dependency on provision `mountcritremote': /etc/rc.d/mountcritremote -> /etc/rc.d/gssd -> /etc/rc.d/kdc -> /etc/rc.d/NETWORKING -> /etc/rc.d/local_unbound -> /etc/rc.d/netwait -> /etc/rc.d/pf -> /usr/local/etc/rc.d/vm -> /etc/rc.d/SERVERS -> /etc/rc.d/mountcritremote.
rcorder: `/etc/rc.d/SERVERS' was seen in circular dependencies for 8 times.
rcorder: Circular dependency on provision `NETWORKING': /etc/rc.d/NETWORKING -> /etc/rc.d/local_unbound -> /etc/rc.d/netwait -> /etc/rc.d/pf -> /usr/local/etc/rc.d/vm -> /etc/rc.d/NETWORKING.
rcorder: `/usr/local/etc/rc.d/vm' was seen in circular dependencies for 10 times.
rcorder: `/etc/rc.d/pf' was seen in circular dependencies for 10 times.
rcorder: `/etc/rc.d/netwait' was seen in circular dependencies for 10 times.
rcorder: `/etc/rc.d/local_unbound' was seen in circular dependencies for 10 times.
rcorder: `/etc/rc.d/NETWORKING' was seen in circular dependencies for 10 times.
rcorder: `/etc/rc.d/kdc' was seen in circular dependencies for 8 times.
rcorder: `/etc/rc.d/gssd' was seen in circular dependencies for 7 times.
rcorder: `/etc/rc.d/mountcritremote' was seen in circular dependencies for 7 times.
rcorder: `/etc/rc.d/dmesg' was seen in circular dependencies for 1 times.
rcorder: `/usr/local/etc/rc.d/vm' was seen in circular dependencies for 10 times.
rcorder: requirement `dovecot' in file `/usr/local/etc/rc.d/postfix' has no providers.
/etc/rc.d/dhclient
/etc/rc.d/sysctl
/etc/rc.d/natd
/etc/rc.d/dumpon
/etc/rc.d/ddb
/etc/rc.d/hostid
/etc/rc.d/ccd
/etc/rc.d/gbde
/etc/rc.d/geli
/etc/rc.d/zpool
/etc/rc.d/swap
/etc/rc.d/zfskeys
/etc/rc.d/fsck
/etc/rc.d/zvol
/etc/rc.d/growfs
/etc/rc.d/root
/etc/rc.d/hostid_save
/etc/rc.d/mdconfig
/etc/rc.d/serial
/etc/rc.d/sppp
/etc/rc.d/mountcritlocal
/etc/rc.d/zfsbe
/usr/local/etc/rc.d/microcode_update
/etc/rc.d/tmp
/etc/rc.d/zfs
/etc/rc.d/var
/etc/rc.d/cfumass
/etc/rc.d/cleanvar
/etc/rc.d/FILESYSTEMS
/etc/rc.d/hostname

I wonder if this this is to blame:

rcorder: `/usr/local/etc/rc.d/vm' was seen in circular dependencies for 10 times.

The top of the vm rc.d script contains:

# PROVIDE: vm
# REQUIRE: NETWORKING SERVERS dmesg
# BEFORE: dnsmasq ipfw pf
# KEYWORD: shutdown nojail

I’m not using dnsmasq or ipfw, but I am using pf.

Looking at pf, it requires netif, which NETWORKING also requires – there is no need to say BEFORE: pf or ipfw.

Let’s try that change:

[slocum dan /usr/local/etc/rc.d] % rcorder /etc/rc.d/* /usr/local/etc/rc.d/* | head -30
rcorder: requirement `dovecot' in file `/usr/local/etc/rc.d/postfix' has no providers.
/etc/rc.d/natd
/etc/rc.d/sysctl
/etc/rc.d/dhclient
/etc/rc.d/dumpon
/etc/rc.d/ddb
/etc/rc.d/hostid
/etc/rc.d/ccd
/etc/rc.d/geli
/etc/rc.d/gbde
/etc/rc.d/zpool
/etc/rc.d/swap
/etc/rc.d/zfskeys
/etc/rc.d/fsck
/etc/rc.d/zvol
/etc/rc.d/growfs
/etc/rc.d/root
/etc/rc.d/sppp
/etc/rc.d/mdconfig
/etc/rc.d/hostid_save
/etc/rc.d/serial
/etc/rc.d/mountcritlocal
/usr/local/etc/rc.d/microcode_update
/etc/rc.d/zfsbe
/etc/rc.d/tmp
/etc/rc.d/zfs
/etc/rc.d/var
/etc/rc.d/cfumass
/etc/rc.d/cleanvar
/etc/rc.d/FILESYSTEMS
/etc/rc.d/adjkerntz

I’ve opened PR 269012.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top