<< April 2009 | Home | June 2009 >>

Taming VirtualBox with VBoxHeadless and VBoxManage

First off, allow me to say, I have really come to appreciate Sun's VirtualBox. it really is the easiest open-source, cross-OS virtualization product I have found.  I really hope Oracle keeps it rolling!

One of my favorite features of VirtualBox is that they have provided command line interface tools.  The VBoxHeadless and VBoxManage programs allow access to a complete array of VirtualBox's functionality.  You can create, configure, start and stop virtual machines all from the command prompt, thus meaning it can be all scripted via the normal methods.

VBoxHeadless:

The VBoxHeadless program allows you to start a VirtualBox VM from the command line without the unnecessary step of launching the VirtualBox GUI application.  To start a VM simply pass the -startvm <name|uuid> parameter...
    $ VBoxHeadless -startvm centos5
or
    $ nohup VBoxHeadless -startvm centos5 &
The nohup version is only available under Linux, and lets you After you've given the VM ample time to complete it's boot, you'll be able to connect via ssh, vnc, Remote Desktop or any other method of connecting to a remote machine.  NOTE: You should always shut the VM down from within.

VBoxManage:

The VBoxManage program is the meat and potatoes.

Start a VM...

$ VBoxManage startvm "win7"
VirtualBox Command Line Management Interface Version 2.2.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Waiting for the remote session to open...
Remote session has been successfully opened.
Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!

Export this post as PDF document  Export this post to PDF document