When I start vboxheadless like this, it gives an error: # service vboxheadless start vmname vboxheadless already running? (pid=738 756 770 784 798 812 826 840 854 868 882 896 910 924 938 952 966 980 994 1008 1022 1036 1050 1064 1078). The listed pids are from the VBoxHeadless instances that are already running. These were started on boot, via rc.conf In rc.conf they are listed like this: vboxheadless_machines="vmname2 vmname3 vmname4 vmname-etc" If I use /usr/bin/install and /usr/sbin/daemon to create a pid and to start VBoxHeadless the vm starts up like it should. The virtual machine I am trying to start is not listed in vboxheadless_machines, and does not get started at boot. It works the same for other virtual machines that are not started on boot.
Same here, haven't had time to check into this yet. Issue occurred after upgrade from: virtualbox-ose: 4.3.30 -> 4.3.38_1 System patch level also went from: 10.3-RELEASE-p3(I think) -> 10.3-RELEASE-p7
Seems to be since revision 292450 and/or revision 291770 of the freebsd base system. Noticed the same problem since I updated from 10.1 to 10.3 yesterday. https://svnweb.freebsd.org/base/release/10.3.0/etc/rc.subr?view=log +++++++++++++++++++++++ MFC r291770: rc.subr: Check for running daemons before a custom start_cmd is executed. Currently rc scripts implementing their own start_cmd do not enjoy the benefits of rc.subr's own check for rc_pid. This leads to around a third of ports with such a start_cmd not to check for the process at all and two thirds of ports to re-implement this check (sometimes wrongly). ---> This patch moves the check for rc_pid to before ${rc_arg}_cmd is executed. +++++++++++++++++++++++ You can start vboxheadless using faststart after boot. When using fast the check for a 'pidfile' will be skipped. Dont know what checks will be skipped also. Pieter
Maintainer feedback?
*** Bug 228111 has been marked as a duplicate of this bug. ***
A commit references this bug: Author: bdrewery Date: Tue Jul 24 23:22:28 UTC 2018 New revision: 475282 URL: https://svnweb.freebsd.org/changeset/ports/475282 Log: vboxheadless: Fix start of specific machine after base r291770. The vboxheadless rc script has its own pid checking, so the rc.subr version in run_rc_command is not needed. PR: 212074 Changes: head/emulators/virtualbox-ose/Makefile head/emulators/virtualbox-ose/files/vboxheadless.in
A commit references this bug: Author: bdrewery Date: Tue Jul 24 23:23:59 UTC 2018 New revision: 475283 URL: https://svnweb.freebsd.org/changeset/ports/475283 Log: MFH: r475282 vboxheadless: Fix start of specific machine after base r291770. The vboxheadless rc script has its own pid checking, so the rc.subr version in run_rc_command is not needed. PR: 212074 Approved by: portmgr (implicit) Changes: _U branches/2018Q3/ branches/2018Q3/emulators/virtualbox-ose/Makefile branches/2018Q3/emulators/virtualbox-ose/files/vboxheadless.in