Long running process defined as Service
If you want to create a service on demand create a service with Automator and enter

/usr/bin/VBoxManage startvm "Ubuntu" headless &amp;


with the same settings as in your screenshot and that's it.

And here is a nice icon for the service to get rid of the default one:



Coipy and paste it in the info window.



If you want to start it at log-in create a shell script somewhere in your User folder and a plist in ~/Library/LaunchAgents:

Start Terminal and enter:

mkdir ~/bin
cd ~/bin
touch vboxmanage.ubuntu.sh
chmod 755 vboxmanage.ubuntu.sh


Use a text editor or nano to edit the script and add:

#! /bin/sh

/usr/bin/VBoxManage startvm "Ubuntu" headless


Then create a plist file in ~/Library/LaunchAgents with the name com.vboxmanage.ubuntu.plist and the content:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;com.vboxmanage.ubuntu.plist&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/Users/YourUserName/bin/vboxmanage.ubuntu.sh&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;RunAtLoad&lt;/key&gt;
    &lt;true/&gt;
    &lt;key&gt;LaunchOnlyOnce&lt;/key&gt;
    &lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;


Modify the file:

chmod 644 ~/Library/LaunchAgents/com.vboxmanage.ubuntu.plist


and launch it with:

launchctl load ~/Library/LaunchAgents/com.vboxmanage.ubuntu.plist


Afterwards the VM will be started after every log-in to your account