Starting VirtualBox VMs from an Icon or CLI

I get an amazing number of hits (relatively speaking) from Google searches for VirtualBox related information. One of the more frequently recurring search goals is for a way to start a Virtual Machine (VM) from an icon or shortcut as opposed to through the VirtualBox Management Interface.

Well, it’s pretty easy really – at least on Linux, and from what I can gather it’s similar on Windows too. The commands below are from an Ubuntu Linux host so case is important; and the quotes are too! I am not sure about M$ – don’t tend to use it much đŸ˜€ – but it will probably be a similar syntax just case-insensitive.

Basically the command you need is:

VBoxManage startvm "Your Machine Name"

On my system I have a few VMs for testing various things. I have one, for example, called “Ubunty Hardy” as you can see from this screen-shot of the management console.

VirtualBox Management Console
(The machine name to pass to the VBoxManage startvm command is the text in bold)

To start the Ubuntu Hardy Virtual Machine from the command line I would simply use VBoxManage startvm "Ubuntu Hardy".

Similarly, to start the WinXP vm, I would need to type: VBoxManage startvm "WinXP".

So, it should be obvious by now that to create a desktop icon, panel button and the like to start a VM, or to start one automatically during boot-up for example, you just need to use the appropriate command-line instruction in your script, icon configuration or shortcut.

There are a great many parameters that can be given to the VBoxManage utilty. Running it without any switches gives a brief yet comprehensive overview. The VirtualBox documentation pages have plenty more details.

Hope this helps the many Googlers out there.

Tags: ,

4 Comments

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>