How-To: Start VBox VM Using Scripts / Command Lines

From my previous post on how to run Bootcamp in VirtualBox, I just realize I forget to mention this launching tip, so here it is.

VirtualBox is a fantastic freeware. I really love it. It may not be as feature rich or efficiently good as other paid alternatives like VMware or Parallel, but it offers lots of great functionality, and is in active development.

To start a virtual machine (of VirtualBox) using command lines:

In Mac or Linux, open Terminal and type

vboxmanage startvm (vmname)

replace (vmname) with yours, for example Ubuntu, press Enter. That’s it.

If you use Linux, you can save this as a script file, and use it to start the vm instead.

In Mac, there is a neat and pretty way to start vm as app, using AppleScript. In AppleScritp Editor, type

do shell script "vboxmanage startvm (vmname)"

and save the file as an Application.

Save as Applications
By launching this app, it starts your VM. You can also change its icon, so it looks pretty and easy to recognize. This is how mine looks. I use Windows and Ubuntu icons found from the Internet (so they’re not mine), so I can distinguish them and they blend in my Applications folder well enough.

VM icons

New Pretty Icons

For Windows, you use similar approach with batch files. In Notepad, type this 2 lines in

cd "c:\Program Files\Oracle\VirtualBox"

vboxmanage startvm (vmname)

save as .bat file, and there you go, double click it to start the specified virtual machine.

Tips: If you don’t know what is your vm name, use this commands in Dos or Terminal, 😉

vboxmanage list vms

About Dekpient

A crazy kid who never wants to grow up.

5 thoughts on “How-To: Start VBox VM Using Scripts / Command Lines

  1. leonstafford says:

    Great! I’ve been a fan of VBox since it came out and would love to see such open source emulation software become as feature rich as the paid counterparts…Hopefully the letters “Oracle” now on it’s logo won’t have detrimental effects on its development!

    • Dekpient says:

      Yeah, it’s been almost 2 years since they acquired vbox, looks good so far, hope it continues this way though. One thing VBox can definitely improve is its cpu usage; it rather annoys me sometimes, but overall it’s fantastic ! 🙂

  2. […] How-To: Start VBox VM Using Scripts / Command Lines ( […]

  3. […] To start a virtual machine (of VirtualBox) using command lines: […]

Share your thoughts !! :D

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s