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 :D - 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.



SUN to buy VirtualBox


Sun Microsystems Announces Agreement to Acquire innotek, Expanding Sun xVM Reach to the Developer Desktop

SANTA CLARA, CA February 12, 2008 Sun Microsystems, Inc. (NASDAQ: JAVA) today announced that it has entered into a stock purchase agreement to acquire innotek, the provider of the leading edge, open source virtualization software called VirtualBox. By enabling developers to more efficiently build, test and run applications on multiple platforms, VirtualBox will extend the Sun xVM platform onto the desktop and strengthen Sun’s leadership in the virtualization market. This software is available for all major operating systems at www.virtualbox.org and www.openxvm.org.

Wow! Sun is really moving. This acquisition expands their ability to get into enterprises with OSS on the desktop as well as in the data centre.

VirtualBox is a really great virtualisation engine which sits very well on top of my Linux desktops and servers. For example, it enables us to run the dreaded Windows inside a secure cage on our safe and sound Linux infrastructure. For when we need to do integration testing or migration development.

With SUN buying MySQL, and now Innotek they are moving horizontally across the enterprise, gaining more traction where M$ is currently king…

Think about it. Sun now have,

  • Operating System (Open Solaris, or they could chose to support any of the Linux flavours out there too)
  • OpenOffice.org desktop application suite that is gaining traction very fast world-wide
  • One of the world’s most popular database engines used to power much of the web and beyond
  • Cross platform virtualisation technology enabling almost any OS to any OS integration

What else do you think they might go for? Alfresco maybe? Or OpenBravo?…

I do believe there is a real strategy here… Are Sun aggressively going after M$, rather than simply being content to sit in the data centre? You bet they are.

Watch this space… The world is a-changing.



VirtualBox: Seamless Windows


I have one web based service provider that requires me to use Internet Explorer - Parcelforce; the courier firm.

I have been using IE running on Wine up until recently - but I had never got printing to work quite right. You see, when I schedule a shipment for something, their software creates a barcode and label in PDF for me to print. But their system needs me to have IE and the Windows version of Acrobat installed so the label pops up in an IE with the Acrobat Reader plugin window.

I have asked them to support Firefox and Linux but they didn’t even have the courtesy to reply to my email…

Anyway - Wine and IES4LINUX worked for me very well, but I have had to save the pdf file to disk then open the Linux version of Acrobat and print it from there. I have recently moved partitions around on my PC and am running a new install of Ubuntu, so I decided to try a different route for a change…

I installed VirtualBox (the latest .deb from their web site which is 1.52) on my Ubuntu Gutsy desktop and then dug out my old CD of Windows XP and started the install.

What a palaver that was! I had forgotten how laborious the install is: I have an XP “upgrade CD” so had to go and find my Full version of Windows 95, show it that, then type in the stupidly long code and answer lots of questions. And it seemed to take so long to actually copy the stuff to the VM. Then you get the Activation question, registration and lots of network activity…

However, once I’d got it installed, it booted up just fine (In fact it boots much faster in a VM than I recall it doing natively) . After installing VirtualBox’s “guest additions for Windows” you get an improved Windows graphics driver and better mouse control too. The mouse just works when you move the pointer over the VirtualBox guest window or back to the Linux desktop. No need to switch mouse control between the two OSes.

The other nice feature is something they call “Seamless Mode”. This is really cool, it means your guest OS can appear on your desktop without having to be inside a window. By that I mean you can run application (say notepad) and it will appear as a single window on your desktop. Here’s a picture to show you what I mean…

Screen Shot

It’s a bit of a chore just to get access to a barcode label from ParcelForce, but I can do it. It only took me about an hour and I haven’t had to go and buy any software (I already owned my old copy of XP Home and Windows 95) or have to dual boot my computer.

The virtualisation engine is Open Source, the host OS is Open Source. And if Parcelforce would wake up and smell the coffee perhaps they might even keep a customer.


The Open Sourcerer is proudly powered by WordPress and themed by Mukkamu

This site (and most others) look better with Firefox Firefox