How can I launch a Virtualbox VM from the Dock?

How can I put my VirtualBox on my Dock in Mac OS X Lion. I want to have it on my dock so I can click on it to launch it.


I don't use Virtualbox, but based on a couple resources, it looks like you can launch a specific VM from the command line, which means we can create a basic Automator application to serve as a launcher, which you can then put in the Dock.

In Automator, create a new workflow. Add a Run Shell Script action, and enter /abolute/path/to/vboxmanage startvm "vmname" in the text box. Replace vmname with the name of your VM as it appears in the Virtualbox GUI (make sure to keep the quotes though). Save the workflow, setting the File Format to Application. Then drag the resulting app onto your Dock.


Right click VM in Manager, create desktop icon. Select the desktop icon and press Control+Shift+Command+T

That's it done