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.
Asked
Active
Viewed 8,974 times
2 Answers
12
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.
neowulf33
- 103
- 4
robmathers
- 40,434
- 6
- 81
- 116
-
1i did not work :( – techsjs2012 Dec 05 '12 at 02:10
-
Try running the `vboxmanage` command in Terminal and see what output it generates. – robmathers Dec 05 '12 at 02:40
-
When I create the workflow, this is what my command looks like. /usr/bin/vboxmanage startvm /Users/mark/VirtualBox\ VMs/Windows7\ Pro\ 64/Windows7\ Pro\ 64.vbox -- I saved it as "Windows7" – Mark Cohen Dec 05 '12 at 03:27
-
Once I did that, I saved it to my /Applications folder and then copied the VirtualBox icon (`cmd-c, cmd-v` over the icon in the `cmd-i` (get info) for the Automator script) and dragged it to the Dock. – Mark Cohen Dec 05 '12 at 03:29
-
The parameter to the `startvm` command should be the *name* of the VM, not the path to its file. – robmathers Dec 05 '12 at 04:50
-
@robmathers it seems to work better, at least for me using the full path to the vm. – Mark Cohen Dec 05 '12 at 06:05
-
Hmm okay, must be undocumented. In any event, is it working for you as an Automator application @MarkCohen? – robmathers Dec 05 '12 at 06:15
-
Yup! It sure is. – Mark Cohen Dec 05 '12 at 08:03
-
i dont have have vboxmange? I have /usr/bin/vboxwebsrv – techsjs2012 Dec 06 '12 at 22:52
-
Try replacing that path with `/Applications/VirtualBox.app/Contents/MacOS/VBoxManage`, per [this forum post](https://forums.virtualbox.org/viewtopic.php?f=6&t=18054). – robmathers Dec 06 '12 at 23:00
-
this worked but how can I change the icon. – techsjs2012 Dec 06 '12 at 23:13
-
The easiest way to change the icon is to **Get Info** (File menu, or ⌘I) on the app you created, do the same on another file/app with the icon you want, select the icon and copy/paste it over. – robmathers Dec 07 '12 at 00:01
-
i did not work.. I want to it and did a ⌘I and then draged the new image i wanted on it but all that it did was start my vm – techsjs2012 Dec 07 '12 at 00:50
-
You can't drag and drop with app icons. Follow the instructions in [this question](http://apple.stackexchange.com/questions/369/can-i-change-the-application-icon-of-an-automator-script). – robmathers Dec 07 '12 at 00:56
-
It worked, but fails to do the only thing I wanted: to open the VM in the current workspace, not switch to the one where VirtualBox is already running (a different VM). :( – cliffordheath May 02 '19 at 00:46
-
this solution works for adding any unix or brew utility to the dock, e.g. wxmaxima – vwvan Jan 13 '22 at 09:49
3
Right click VM in Manager, create desktop icon. Select the desktop icon and press Control+Shift+Command+T
That's it done
moogaloo
- 31
- 1
-
Does not work: "Trying to open a VM config '/Users/BLAH/VMPATH/VMNAME.vbox' which has the same UUID as an existing virtual machine." – cliffordheath May 02 '19 at 00:40