VirtualBox Solutions

by Mike on July 10, 2009

in Virtualization

As a Linux administrator or as as Desktop user, there are times when you would either like to try a different distribution or when you need several test machines that you can blow away when you are done with them..  I have used VMWare with a a lot of success over the years but VirtualBox provides an excellent option that is Open Source. VirtualBox 3.0 just came out and is a great upgrade to an excellent product.  This tutorial will show you how to install and use the options based on a Debian Lenny install.

Add this line to your /etc/apt/sources.list

deb lenny non-free

Now run this command to install the Sun public key.
wget -q -O- | sudo apt-key add -

Once that is done you can install from the command line:
# apt-get install virtualbox-3.0


Once the you start the program you can decide on what virtual machine you want to build.  In the example a virtual machine for CentOS 5.3 is created.  Notice the “Name” is descriptive.  The operating system is Linux and the kernel for Linux is the newer 2.6 kernel.  These are standard options you can use with most Linux distributions.


Usually you will want a machine that has some extra RAM available, so that you can use it for your virtual machine.     In this example you can see the machine has 3 GB of RAM available and around 500 RAM is selected to use for the virtual machine..  When you go light on the RAM you end up with a slow virtual machine that is frustrating ….so spend the money and get some RAM.


You can create a hard drive virtual space for the operating system.  The default will want a space like 8 GB but you can create a virtual machine with more or less depending on what you need.  In this example, an existing drive is used to boot from.


At this point you can see the virtual machine has been created, as other have been created as well.  The next step is to install the operating system.


Here is the sequence if you create a drive.  Note you can determine size and if you want it to be dynamic and expand as you use it.






When you choose to install you need to have a source for the *.iso file for your Linux distribution.  You can either select the CD/DVD and burn an iso to access or you can use a USB flash drive and load the iso on there.  The advantage is that you do not need to keep buring DVDs for your distros.  When you start the virtual machine you will need to install it with the Wizard which is a simple process.


This is the standard, start the install from the CD/DVD.


Here is an example of choosing the iso image that you can have located anywhere on your system.


Once you get to this place it is an installation of the OS you are trying to use.  It works very easily and has lots of options.

Previous post:

Next post: