I found a problem with VM-BHYVE.
VM-BHYVE provides a service vm which starts /stop the VM's on system startup and on system stop.
The problem is with shutdown of the host system. The script in /usr/local/etc/rc.d/vm uses "vm stopall" to terminate the VM's.
vm stopall sends the VM's the signal to shut down the system. if "vm stopall" is done, the script "/usr/local/etc/rc.d/vm" is done, too, so that the shutdown process of the host is continued and this is the problem, because "vm stopall" does not wait until the VM's are really finished and the shutdown processes of the host are continued, the VM's which are not finished with the schutdown will be aborted. This leads to broken file systems in the VM's -> fatal
they can easily verify that. Start a VM in a shell a: vm -f start test and now stop the VM: vm stop test in another shell b and you will see that the command in shell b is finished faster and the VM in shell a is still in the shutdown process.
In the script:
in the function core::stopall() or core::stop()
to add a check function that waits with the continuation until the VM's are actually finished. so the task: bhyve <vm-name> has disappeared.
This way you can make sure that when the host system is stopped, all VM's are really stopped.
(In reply to Bernhard Berger from comment #0)
Thanks for the report!
I guess this could be discussed upstream so that a fix for this problem could be included in the next release of vm-bhyve: https://github.com/churchers/vm-bhyve
This information might be helpful to know!
I found out that when using "reboot" the function "stop" in the service vm is not executed because reboot obviously does not execute the script /etc/rc.shutdown (see ticket 243094)