I got a contribution from @saljam at boot2docker-xhyve on GitHub as below.
Running boot2docker xhyve on boot · ailispaw/boot2docker-xhyve Wiki
It allows us to launch boot2docker-xhyve on booting Mac OS X.
In addition, I found LaunchControl that enables us to manage lanuchd and edit its configuration files with GUI.
And also it has a menu bar item which we can control launchd daemons/services from.
I'd like to share it here.
$ git clone https://github.com/mist64/xhyve
$ cd xhyve
$ make
$ cp build/xhyve /usr/local/bin/ # You may need sudo.
$ git clone https://github.com/ailispaw/boot2docker-xhyve
$ cd boot2docker-xhyve
$ make
$ curl -OL http://www.soma-zone.com/download/files/LaunchControl_1.20.2.tar.bz2
$ tar jxf LaunchControl_1.20.2.tar.bz2
$ mv LaunchControl.app /Applications
-
Open
LaunchControl.app
. -
Select
Global Daemons
at the top of the left column.
*) You may ask your password to give it the root privilege. -
Click
+
at the bottom right corner of the left column to create a new plist file for boot2docker-xhyve. -
Rename
local.job
at File column withboot2docker.xhyve
or whatever you want. -
Rename Label at the top of middle column as well.
-
Drag & Drop WorkingDirectory from the right column to the middle.
-
Replace
/
with the directory where you've placed boot2docker-xhyve.
ex.)/Users/ailispaw/Documents/Codes/GitHub/boot2docker-xhyve
-
Replace
/usr/bin/env
at Program to run box with./xhyverun.sh
. -
Drag & Drop
EnvironmentVariables
from the right column to the middle. -
Replace
VAR
at Name column withPATH
. -
Replace
VAL
at Value column with your PATH environment variable that includes the path where you've installed xhyve.
ex.)/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
-
Uncheck a checkbox at the next to boot2docker-xhyve at the left column as below, if you don't want to lanuch it on booting Mac OS X.
-
and Save it.
-
Select and highlight
boot2docker-xhyve
at the left column. -
Select Job menu and QuickLaunch submenu at the menu bar.
-
Check Enable QuickLaunch at Preferences of LaunchControl menu.
Done. Now you see a new menu bar item.
Q: I chose Start submenu at the menu bar item, but nothing happened.
You may need to open
LaunchControl.app
and selectGlobal Daemons
again to give it the root privilege at the first time after booting Mac OS X.