Recent Posts


« | Main | »

Virtual Box & Cobbler – automating virtual system builds

By Dale Reagan | October 8, 2008

Cobbler – a provisioning system for Linux or other OS builds

Virtual Box – A virtual machine (VM) management suite (packaged by Sun)

Just a few years ago the hardware in computer systems (PCs and servers) tended to contain quite a number of proprietary components which required special treatment/drivers/setup-configuration to create a functional and useful system.  The build process tended to be time consuming and was typically customized based on customer and application needs.  Still, the required build process time could be reduced by adopting standard configurations for both the OS and hardware; including time for system ‘burn-in testing’ this process could take one or more days.   Using commodity hardware and standardized, Open Source components, it is possible (and has been for several years) to build and begin producton use of new new systems (physical hardware or virtual hardware) in minutes. 

The introduction of ‘kickstart’ files (I believe Red Hat introduced this) provided a means to automate the server/workstation build process, but human intervention was still needed to initiate the process.  By combining PXE boot capabilitiies (hardware based, networked booting) with a provisioning management system Cobbler provides a means to totally automate server/workstation provisioning & configuration.  Once a system has been built (i.e. the operating system – OS – is installed and functional) then Cobbler can be used for server/workstation updates as well.

I initially used Cobbler for testing automated provisioning of new systems – the initial target was bare metal.   Once virtual network bridging and firewall requirements are met this works for virtual systems as well.  The steps discussed are quite similar to approaches being used for creating and deploying virtual machines via Cloud Computing (i.e. Amazon AWS, Google computing services, etc.) as well as Cluster Computing (the distinction getting a bit blurred, but, essentially compute clusters work as a unit while VMs may or may not share ‘compute problems’.)

One approach to virtual machine (VM) creation is to:

  1. create a VM specification file (including virtual network bridging if required)
  2. create a physical disk image for the VM
  3. install an OS for the VM (this is typically a manual process where you make selections about disk use, applications installed, network setup, etc.)
  4. run/use the VM  and/or
  5. use the VM as a base to clone other VMs  (this is typically where Cloud Computing starts – you use a prepared image or your build (or have one built) an image to run your application)

Once you have a master, working VM then simply make copies using appropriates tools for your VM method/tool suite.  This is very simple and quick (depending on the VM image size) – to change a system image, however, you still need to create a new VM (or a new ‘clone’ image) and add the desired, new functionality.    VM image cloning is possible for any image including one built using the Cobbler process.

Using Cobbler and Virtual Box to Build VMs (step 3 above)

This is (perhaps) a longer path then needed if you just want to create a few VMs but it is quite flexible once configured.  By using an automated build approach we automate step #3 above.   During testing I:

Virtual Box considerations

Server and network setup/configuration

The physical box is used to provide all central-type services:  Cobbler, Remote Log Server, time server, build server, DNS server, etc.  Virtual Machines are created in any arrangement required – the only limits are host CPU, RAM and disk storage.

In this scenario the host system uses two network interface cards (NICS) providing access to the ‘boot network’ and to the outside world.  There are other networking approaches but I found this to be relatively simple.

Kernel IP routing table
Bridge Configuration
bridge name bridge id STP enabled interfaces
virbr0 8000.0040053699b1 yes eth1

Combining Cobbler and Virtual Box allows for custom, automated, on demand image builds – just setup images, activate them and take a coffee break. 🙂

Destination Gateway Genmask Flags Metric Ref Use Iface * U 0 0 0 vbox0 * U 0 0 0 virbr0 * U 0 0 0 vbox1 * U 0 0 0 vbox2 * U 0 0 0 eth0 * U 0 0 0 eth1
default router. UG 0 0 0 eth0

Topics: Computer Technology, Unix-Linux-Os, Virtual-Cloud Computing, Web Problem Solving, Web Technologies | Comments Off on Virtual Box & Cobbler – automating virtual system builds

Comments are closed.

YOUR GeoIP Data | Ip:
Continent: NA | Country Code: US | Country Name: United States
Region: | State/Region Name: | City:
(US only) Area Code: 0 | Postal code/Zip:
Latitude: 38.000000 | Longitude: -97.000000
Note - if using a mobile device your physical location may NOT be accurate...

Georgia-USA.Com - Web Hosting for Business