Linux virtualization - Setup virtualbox in Slackware

Submitted by jinlusuh on Sun, 01/04/2009 - 07:36

A virtualization in Linux has several meanings. The Linux virtualization term, as used by Novell, is consolidate workloads running on multiple physical servers onto a single physical server. The other meaning of Linux virtualization is installing another operating system on top of the current Linux operating system, which is known as native virtualization. You probably have heard about virtual pc and vmware in Windows environment. Those are virtualization software, which allow other operating system to be installed in the current operating system. They act as an interface between host and guest operating system.

This tutorial is about the native virtualization, installing a guest operating system in our current Linux. We are going to use Sun's Virtualbox virtualization software instead of VMware. Virtualbox is the only open source virtualization software available at the moment.

These are all steps needed to properly install Virtualbox in Slackware:

Prepare Slackware build environment

To prepare the Slackware build environment, we are going to create several directories to keep sources and build packages. This step is not mandatory but it's necessary to keep our system clean. These are directories suggested by Slackbuilds dot com:

Download slackbuild scripts for VirtualBox Open Source Edition

Slackbuilds dot org team has developed many slackbuild scripts to build packages for Slackware. Download slackbuild script for virtualbox-ose from slackbuild dot org repository and move it to the /home/slackware/source/myslackware directory.

[email protected]:~# cat /etc/rc.d/rc.local
#!/bin/sh
#
# /etc/rc.d/rc.local: Local system initialization script.
#
# Put any local startup commands in here. Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

Install VirtualBox Open Source Edition Slackware package

Checking and testing Virtualbox

We can check Virtual package has been successfully installed with pkgtool View option.

Finally, we can open Virtualbox with kde.

Although the virtualbox is already there, we still can't install guest operating system. We have to prepare a kernel driver for the new operating system we are going to install. Let's say we want to install Ubuntu server 8.10 as a guest, we need to create a base kernel driver for Ubuntu first.