Build a Virtual Network Lab with VirtualBox

Contents:

Introduction

UNDER CONSTRUCTION

Want to experiment with OpenFlow SDN, but don’t have any switches? No problem. You can build a simple, but powerful, lab within a virtualised environment. These instructions should hopefully save you a lot of time figuring out the more obtuse features. VirtualBox is used as the hypervisor. Here is a logical diagram of the lab we’re going to build:

images/lab_overview.png

The lab is mainly Ubuntu guests, but also uses a FreeBSD guest. That is the advantage of using a full hypervisor for the lab over containers - you can implement guests with different operating systems.

Pre-Requisites

  • VirtualBox (https://www.virtualbox.org/) installed on a suitable host machine
  • Host must have sufficient RAM (test PC was Windows 7 with 8GB RAM)

Base Ubuntu VM Build

UNDER CONSTRUCTION

We start by building a base Ubuntu VM image, from which we can clone other guests.

First, download a suitable supported Ubuntu desktop distribution.

MORE HERE ABOUT TYPES...

In VirtualBox, create a new Ubuntu guest with 1024MB of RAM and 12GB of storage (or other values as appropriate). Consider creating the hard disk as fixed size to improve performance.

IMAGES HERE...

Go into the guest settings to configure it to boot off the ISO. Under Storage, click on the Controller: IDE row and then click on the Add CD/DVD Device Icon, “Choose disk” and browse to the ISO:

IMAGES HERE...

Do the same process to add the ISO for the Guest Additions. On Windows it is located in C:Program FilesOracleVirtualBoxVBoxGuestAdditions.iso

As above, there should now be two ISO files associated.

Start the VM and install Ubuntu as per the defaults (or your own preferences!)

Install VirtualBox Additions

Once the build is completed and the guest is running, log in and start a terminal window (CTRL+ALT+T). Install the VirtualBox additions for improved host-guest integration:

cd /media

Look for the appropriate subdirectories that contain the correct additions version. Example:

Indices and tables