Virtual Box

After looking over the virtualization with different setups, KVM and VirtualBox I decided to use the virtualbox method because it just appeared to be nicer and with a nice GUI per machine just felt nice.

With the additions of the Guest Additions to allow for sharing of folders from the host machine to the virtual one and also the mouse was no longer taken within the virtual machine, I just liked it and to setup a bridge for the virtual machine to use for the networking I created a small script that does the job of deleting the KVM inserting modules into K/Ubuntu.

Here it is

#!/bin/sh
 
# to remove any kernel modules for kvm and then bring up the bridge for eth0
TMP=`lsmod | grep kvm`
RESULT=`echo $TMP | cut -d \  -f 1,4`
 
if [ -n "$RESULT" ]; then
 
        for i in 1 2
        do
                rmmod `echo $RESULT | cut -d \  -f $i`
        done
else
        echo "No kernel modules"
fi
 
# setup the eth0 for working with the bridge
ifconfig eth0 0.0.0.0
#ifconfig br0 down
 
#setup the bridge and bring it up
brctl addbr br0
brctl addif br0 eth0
 
ifconfig br0 up

Leave a Reply

Your email address will not be published. Required fields are marked *